RE: [PHP] Correct handling _POST[] and implode. PHP5

From: Date: Fri, 09 Oct 2009 08:14:20 +0000
Subject: RE: [PHP] Correct handling _POST[] and implode. PHP5
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-298793@lists.php.net to get a copy of this message
> Its very obvious that $_POST["color"] is not an array. > > do something like this and you wil get the values. > > $arr_color = $_POST["colors"]; > > //iterate over the array > foreach($arr_color as $val) > { > $str_color .= ", " . $val; > } so it's simple, it's not an array, but your assignment magically makes it an array since you wrote "iterate over the array" ... very, very clear, isn't it? _________________________________________________________________ Windows Live: Keep your friends up to date with what you do online. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010

« previous php.general (#298793) next »