$vars = array();
$url2 = explode("?", $url);
$url3 = explode("&", $url2[1]);
for($i=0;$i<sizeof($url3);$i++)
{
$url4 = explode("=", $url3[$i]);
array_push($vars, array($url4[0], $url4[1]));
}
for($i=0;$i<sizeof($vars);$i++)
{
echo $vars[$i][0]."=".$vars[$i][1];
}
?>
- James "ReDucTor" Mitchell
----- Original Message -----
From: Andy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 5:19 PM
Subject: [PHP] Parse URL parameters
> How can I parse parameters sent with the URL of an pgp site?
>
> Example: I call the site with
> http://www.server.xyz/sub/site.php?a1=123&a2=312
> How can I get the values of a1 and a2?
>
> Thanks, folks!
> Andy.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]