My intention is to output $car1, $car2 to have a list in the HTML output e.g Toyota, BMW, ...However i am getting $car2 in the HTML output. How does one make the loop output $car1, $car2... Is there another function other than echo to do this?
for ($i = 1; $i <= 10; $i++) {
echo $car . $i;
echo "<br>";
}
echois not a function, and you mean<br />.