I have a very small script that I need help with. I'm learning PHP, and I can't figure out why this loop won't work. Please help! =]
Here it is:
<?PHP
$counter = 0;
$start = 1;
for($start; $start < 11; $start++) {
$counter = $counter++;
print $counter . "<BR>";
}
?>
It DOES work when I do this, however:
<?PHP
$counter = 0;
$start = 1;
for($start; $start < 11; $start++) {
$counter = $counter + 1;
print $counter . "<BR>";
}
?>
I bolded the difference between the two. Thank you very much.