Problem with while loop..
Posted: Sat Nov 28, 2009 11:44 am
I'm setting up a while loop to run through years up to a maximum of 80 for a select form box so I don't manually write the code in and waste a lot of time and lots of code to my page. Although its taking me longer now I have this error, but I'm hoping someone can help explain it.. This is my simple code...
And when i run the page i receive this error instead...
Doesn't make much sense seeing as I do have a ; there.. Any help please.. And line 77 is
Code: Select all
$counter = 0;
$year = 2000;
while($counter <= 80){
echo "<option value ="$year-1">"$year-1"</option>";
}And when i run the page i receive this error instead...
Code: Select all
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\xampp\htdocs\Briefsystem\Accused.php on line 77Code: Select all
echo "<option value ="$year-1">"$year-1"</option>";