if empty php echo or else Function
$a = 0;if (empty($a)) { echo “Variable a is empty”; } else { echo “Variable is not empty”; } // True because $a is setif (isset($a)) { echo “Variable ‘a’ is set”;} also you can use if (isset($a)) {echo “Variable ‘a’ is set.”;}