Clep Sydra
0
Q:

php empty array

if (empty($array)) {
     // list is empty.
}
6
$emptyArray = []; 
$emptyArray = array();
$emptyArray = (array) null;
2
$emptyArray = []; 
$emptyArray = array();
$emptyArray = (array) null;
1
//To clear array you are able to simply re-instantiate it
$foo = array();

//To clear $foo from the symbol table use
unset($foo);
-1
empty($var)
-2

New to Communities?

Join the community