how to get name of GET variables present in url?

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

Post Reply
dentrite
Forum Newbie
Posts: 16
Joined: Thu Jun 17, 2010 7:10 am

how to get name of GET variables present in url?

Post by dentrite »

hi, i have seen in sites like facebook that they use url like this page.php?showcomment&storyid=1 i want to know the names of variables that are present but not set to a value like showcomments in above example.in simple words i want to check the presence of variable if present some output and it not something else. thanks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: how to get name of GET variables present in url?

Post by requinix »

Tip:

Code: Select all

var_dump($_GET);
Then look at the output. The answer is there.
Post Reply