RE: [PHP] Trying to keep a dropdown selection sticky

From: Date: Sun, 06 Jul 2008 05:06:37 +0000
Subject: RE: [PHP] Trying to keep a dropdown selection sticky
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-276326@lists.php.net to get a copy of this message
On Sat, 2008-07-05 at 21:27 -0700, Warren Vail wrote: > foreach ($state_list as $key => $value) { > echo "<option value=\"$key\""; > if($key == $choice) echo " selected"; // now it's > sticky > ;-) > echo "> $value</option>\n"; > } Just another quick ?.. where is $choice coming from? or is that the name of the select in <SELECT NAME='namehere'> -- Michael S. Dunsavage

« previous php.general (#276326) next »