Re: explode won't explode

From: Date: Fri, 27 Apr 2001 17:49:27 +0000
Subject: Re: explode won't explode
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50662@lists.php.net to get a copy of this message
On Friday 27 April 2001 14:15, Tom Beidler wrote: > I have the following code that doesn't seem to "explode." I'm trying to > make a field that looks like 21,23,25,27 or small,medium,large,x-large > into a pulldown menu with the individual item broken out. > > if (($size != "") && ($size != "n/a")) { > $sizearry = explode(",", $size); > while (list($key,$value) = each($sizearry)) { > $size_option_block .= "<option > value=\"$value\">$size</option>\n"; Why are yo using $size (the unexploded string) in the last line? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Error 032: Recursion error - see error 032

« previous php.general (#50662) next »