[Phpwm] multiple values with same name in $_get request
Greg Jones
greg.jones at gmail.com
Tue Jul 3 17:16:59 BST 2007
$_SERVER['QUERY_STRING'] contains the querystring. I think $argv might
do as well, but the former seems a little tidier. You can urldecode()
this, and then explode() it on '&' to get each pair, and then explode
again on '=' to get the key and the value.
If you have control of how the data is sent, then sticking [] after
the 'key's that will have multiple values (so prodCode[]=405939 etc.)
will cause $_GET['prodCode'] to be an array of the values.
Greg
More information about the Phpwm
mailing list