check if array is null in php code example
Example 1: array should not be empty php
$arr = array();
if(!empty($arr)){
echo "not empty";
}
else
{
echo "empty";
}
Example 2: check null in_array php
if (!empty($data_days) && in_array(1, $data_days, true)){ // use numeric value 1, not string