PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Mon Dec 06, 2004 5:16 pm
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.
DrHoliday
Forum Newbie
Posts: 11 Joined: Mon Dec 06, 2004 5:12 pm
Location: Germany
Post
by DrHoliday » Mon Dec 06, 2004 5:22 pm
That would be $_GET:
Code: Select all
echo "<pre>";
print_r($_GET);
echo "</pre>";
Wolfgang
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Mon Dec 06, 2004 5:30 pm
Thanks, my fault for not consulting the docs first, prolly woudda been a quick find.