RE: [PHP] passing array of variables in a query string
| From: | Kevin Stone | Date: | Fri, 01 Mar 2002 17:15:52 +0000 |
| Subject: | RE: [PHP] passing array of variables in a query string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86795@lists.php.net to get a copy of this message | ||
To form an array of values in the GET string append brackets to the end
of each variable name...
http://www.archipro.com/test.php?state[]=AB&state[]=BC
for($i=0; $i<count($state); $i++)
{
echo $state . "<br>";
}
Result:
AB
BC
Hope this helps. :)
-Kevin
-----Original Message-----
From: Diana Castillo [mailto:diana.castillo@nvtechnologies.com]
Sent: Friday, March 01, 2002 9:42 AM
To: php-general@lists.php.net
Subject: [PHP] passing array of variables in a query string
I was wondering if someone could help me
with this:
what I need to know is how to pick up an array of variables from
a query string such as:
http://www.archipro.com/test.php?state=AB&state=BC
If I use $state, I get only the last one.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php