Passing URL parameters to array question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :)


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux