Passing URL parameters to array question.

From: Date: Wed, 04 Jun 2003 23:00:03 +0000
Subject: Passing URL parameters to array question.
Groups: php.db 
Request: Send a blank email to php-db+get-28325@lists.php.net to get a copy of this message
Hey all, anyone know how I can pass an array of parameters to an array? Basically if I want to pass the parameters in a URL, for example: viewcart.php?quantity%5B14%5D=2&TypesOfInterests=11&recalculate=true I'm using the following but it ain't workin so far. foreach($shoppingcart['products'] as $buy => $quantity) { if ($_GET['buy'] == $buy) { // if we are here, we know this is the one $shoppingcart['products'][$buy] = $_GET['quantity']; } When I view the cart at the moment only the value passed in the 1st instance are assigned to the array. Any ideas? Cheers, Graeme :)

« previous php.db (#28325) next »