Page 1 of 1

All vars in a url

Posted: Mon Dec 06, 2004 5:16 pm
by Todd_Z
How do i get an array of all the variables listed in the current url. I.E. something that would result in the same as

Code: Select all

<?php
    $vars = array("page"=>"home", "style"=>"red", "category"=>"three");
?>
Thanks.

Posted: Mon Dec 06, 2004 5:22 pm
by DrHoliday
That would be $_GET:

Code: Select all

echo "<pre>";
print_r($_GET);
echo "</pre>";
Wolfgang

Posted: Mon Dec 06, 2004 5:30 pm
by Todd_Z
Thanks, my fault for not consulting the docs first, prolly woudda been a quick find.