Checking if variable exists

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
theotheragentm
Forum Newbie
Posts: 9
Joined: Tue Jun 25, 2002 2:38 pm

Checking if variable exists

Post by theotheragentm »

Normally I check if a variable exists using "if $variable" but I am trying to do this for a server, which I think is running an older version of PHP. The script errors out because the variable does not exist. Is there a way I can check to see if the variable exists, but without checking a value?
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

isset()
theotheragentm
Forum Newbie
Posts: 9
Joined: Tue Jun 25, 2002 2:38 pm

Post by theotheragentm »

Thanks. Works like a charm.
Post Reply