explode won't explode

From: Date: Fri, 27 Apr 2001 12:15:30 +0000
Subject: explode won't explode
Groups: php.general 
Request: Send a blank email to php-general+get-50601@lists.php.net to get a copy of this message
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"; } The interesting thing (and probably the problem) is that I have very similar code just before it that works fine. Here's the code that appears just before and works. if (($color != "") && ($color != "n/a")) { $colorarry = explode(",", $color); while (list($key,$value) = each($colorarry)) { $color_option_block .= "<option value=\"$value\">$value</option>\n"; } I'm not that familiar with explode. Are my $key and $value variables conflicting? >>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>> Tom Beidler Orbit Tech Services 805.682.8972 (phone) 805.682.5833 (fax) tom@orbittechservices.com http://www.orbittechservices.com/ >>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>

« previous php.general (#50601) next »