Brimbox Logo Brimbox Version 2.3.4 Released


Method to check if a variable is empty, same as PHP empty function and not the string "0".

Class: bb_work, called as $main

File: bb_work.php (php)


function blank(&$var)



Returns: boolean true if variable is empty or integer 0, false if variable is populated or the string “0”. Will set the $var if not defined.

This is the equivalent of empty($var) && ($var !== "0")

Parameter: $var (string)
The string or variable to be checked.

Updated: 2016-07-08