Quick workaround for you:
$array = array_filter($array);
if (empty($array)) {
   echo 'Array is empty!';
}
array_filter() function's default behavior will remove all values from array which are equal to null, 0, '' or false
EDIT 1:
In case you want to keep 0 you must use callback function. It will iterate over each value in the array passing them to the callback function. If the callback function returns true, the current value from array is returned into the result array.
function customElements($callback){
  return ($callback !== NULL && $callback !== FALSE && $callback !== '');
}
$array = array_filter($array, "customElements");
var_dump($array);
Usage:
$array = array_filter($array, "customElements");
if (empty($array)) {
   echo 'Array is empty!';
}
It will keep 0 now, just what you were asking about.
EDIT 2:
As it was offered by Amal Murali, you could also avoid using function name in the callback and directly declare it:
$array = array_filter($array, function($callback) { 
   return ($callback !== NULL && $callback !== FALSE && $callback !== ''); 
});
     
    
var_dump()of your actual array?