Jump to content

Problems with Array


gc40

Recommended Posts

Can anyone tell my why this would not work:

 

            <select name="day" id="day">
            <?php
		$selected = $onenav->day;
            for ($i = 1; $i <= 31; $i++)
            {
			foreach ($i as $key => $val)
			{
				$disabled = $key == $selected ? "SELECTED" : "";
				echo "<option $disabled value=\"$key\">$val</option>";
			}
            }
            ?>
            </select> 

Link to comment
https://forums.phpfreaks.com/topic/79674-problems-with-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.