array should not be empty php

PHP
if (empty($array)) {
     // list is empty.
}$arr = array();

if(!empty($arr)){
  echo "not empty";
}
else 
{
  echo "empty";
}

Source

Also in PHP: