I have following IF in my code to check if array are empty,
if (!empty($data['id']) && (empty($data['student_no']) || empty($data['batch']) ) ) {
print_r("inside if ");
}
$data['id'],$data['student_no'],$data['batch'] are arrays.
array values are like below,
1.$data['id'] -> Array ( [0] => 1 [1] => [2] => )
2.$data['student_no'] -> Array ( [0] => [1] => [2] => )
3.$data['batch'] -> Array ( [0] => )
But this does not got to inside the if and print the "inside if" string.
Please tell me what is wrong ?
student_noandbatchare not empty.NOvalues. Array with one empty value is not empty.if (true). That's how you would get inside theifwith these arrays.