Page 1 of 1

isset

Posted: Mon Jun 09, 2008 5:01 pm
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.

Re: isset

Posted: Mon Jun 09, 2008 5:15 pm
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
}

Re: isset

Posted: Tue Jun 10, 2008 4:07 pm
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.

Re: isset

Posted: Thu Jun 12, 2008 8:58 am
by jreategui
Thanks for all!!!!