php see if undefined 1

php see if undefined

if (isset($variable)) { /* do something */ };

Here is what the above code is Doing:
1. First, we’re checking to see if the variable is set.
2. If it is, we’re going to do something.

The code above is a little bit more efficient than the code below:

if (isset($variable)) {
/* do something */

Similar Posts