how to check null array in php code example
Example 1: array empty check in php
if (empty($array)) {
// list is empty.
}
Example 2: check null in_array php
if (!empty($data_days) && in_array(1, $data_days, true)){ // use numeric value 1, not string