Please help
I am doinf a simple loop but I want to see if the loop numbers is equal to a number from my database i want it to say selected.ie
$noplayers (=number from database)
echo "<select name=\"no_players\">";
for ($i = 1; $i <21; ++$i)
{
echo ("<option value=$i>$i</option> \n");
}
echo "</select>";
where can i put in this line without it damaging the loop.
if ($i == $noplayers) echo "SELECTED"
Thanks for you help if you can
Lee