php code to check if variable is null
snippet in php

php code to check if variable is null

user4972

if(empty($var1)){
    echo 'This line is printed, because the $var1 is empty.';
}