lundi 1 juin 2015

Two compares in one if / else statment

however I try I can't find answer on pretty simple question.

Is it possible to ask 2 things in 1 if / else statement?

For example:

if($a>$b AND isset($c)
return TRUE;

I understand it is possible to write it like:

if ($a>$b)
{
 if (isset($c))
 return TRUE;
}

But I look for something easier and less messy in code. I am up for any advise. Thanks

Aucun commentaire:

Enregistrer un commentaire