Answers for "check variable empty"

PHP
9

bash if null or empty

if [ -z "$variable" ];
  then echo "$variable is null";
  else echo "$variable is not null";
fi
Posted by: Guest on April-19-2020
5

php code to check if variable is null

if(empty($var1)){
    echo 'This line is printed, because the $var1 is empty.';
}
Posted by: Guest on May-01-2020

Code answers related to "check variable empty"

Browse Popular Code Answers by Language