mercredi 26 octobre 2016

How to find if a variable is isset and its value equals somthing?

I know it is already asked few time in this forum but i can't get my answer properly.

I have a variable let it be $val i want to check if it is isset and if it's value is equals to 'something'.

if(isset($val) and $val == "something")
{
Do Something ...
}
else
{
Do Another Thing...
}

Note $val is not array, it is a variable. I got a question like this where $val was array.

Thanks In Advance

Aucun commentaire:

Enregistrer un commentaire