isset

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
jreategui
Forum Newbie
Posts: 2
Joined: Mon Jun 09, 2008 3:46 pm

isset

Post by jreategui »

Hello people i 'm newbie in PHP world, i haver some experience in other languages but this is my first one on PHP.
At this moment a have some web site developed by some one to PHP 4.
This developer use many variables lis this:
isset($mod)

I am trying to run the web site on my computer con PHP 5 and all this variables are null.
I trying putting on the registrer_global on PHP.ini but don't have results.

Any idea???

thanks.
hansford
Forum Commoner
Posts: 91
Joined: Mon May 26, 2008 12:38 am

Re: isset

Post by hansford »

$num = 5;
$val = isset($num);
$val == true;
$dum;
$val = isset($dum);
$val == false;
------------------
It's usally used like
if(isset($num)){
//do this or that
}
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: isset

Post by califdon »

jreategui wrote:Hello people i 'm newbie in PHP world, i haver some experience in other languages but this is my first one on PHP.
At this moment a have some web site developed by some one to PHP 4.
This developer use many variables lis this:
isset($mod)

I am trying to run the web site on my computer con PHP 5 and all this variables are null.
I trying putting on the registrer_global on PHP.ini but don't have results.

Any idea???

thanks.
In PHP, every variable begins with a $, so $mod is a variable, but isset($mod) is not a variable, it merely tests whether any value has been set in the variable $mod. As such, the function returns a True or False, depending on whether $mod has been set to a value.
jreategui
Forum Newbie
Posts: 2
Joined: Mon Jun 09, 2008 3:46 pm

Re: isset

Post by jreategui »

Thanks for all!!!!
Post Reply