at the moment my code looks like this but it doesnt seem to work, im trying to display a drop down menu in a form with teh values 1-12 instead of having lots of <option> tags.
for($i= 1; $i=12; $i ++) { echo "<option>$i</option>"; }
for ($i = 1; $i <= 12; $i++) { echo "<option>" . $i . "</option>"; }
thankyou, that works fine!
just out of curiosity, why wouldnt the one i was using work?
because you had $i = 12 instead of $i <= 12
lol, i know what the difference was but not why the difference would make the script not load.
That's because you have an infinite loop.
$i=12 assigns 12 to $i on each iteration. Since the condition never becomes false, the loop never ends on its own.
ah i see, thank for clearing that up 😃