Weird browser bug (I think)

From: Date: Thu, 15 May 2003 16:57:55 +0000
Subject: Weird browser bug (I think)
Groups: php.general 
Request: Send a blank email to php-general+get-147734@lists.php.net to get a copy of this message
I have this for($i = 250; $i <= 1000; $i += 250) { $c_val[] = $i; } echo "Select Calories (number of cals replaced per hour):\n"; echo '<select name="r_calories">'."\n"; foreach($c_val as $v) { $string = ($v != 500) ? "<option value=\"$v\">$v</option>" : "<option value=\"$v\" selected=\"selected\">$v</option>"; echo $string . "\n"; } echo "</select>\n"; It does exactly what it's supposed to and creates this: Select Calories (number of cals replaced per hour): <select name="r_calories"> <option value="250">250</option> <option value="500" selected="selected">500</option> <option value="750">750</option> <option value="1000">1000</option> </select> However, when this is displayed by the browser (Mozilla) it defaults to 1000 BUT if I take this same snippet of HTML and paste it into the page so it's NOT created dynamically it's fine and defaults to 500. Only when it's created via PHP does it default to 1000. Only seems to effect Mozilla only, IE and Opera are ok with it. Heck, even Lynx is ok with it. Any thoughts?

« previous php.general (#147734) next »