session

From: Date: Sun, 07 Jan 2001 04:24:06 +0000
Subject: session
Groups: php.general 
Request: Send a blank email to php-general+get-33058@lists.php.net to get a copy of this message
Hi all, I've a problem manipulating a variable stored in session ... The variable is an array like this: $item[108]=3; $item[56]=1; //the index is the id_product and var value is the number of items All works fine except when I try to modify them in bulk, e.g. using a simple loop like this: foreach($item as $key=>$val){ if($val>0){ $item[$key]=$val; } else { unset($item[$key]); } } session_register("item"); With this code, no changes are applies ... (these values are sent using a simple form via post method like this: <input type=text name=item[108] ...>). Any help or suggestion are very appreciated. Many thanks in advance. max

« previous php.general (#33058) next »