When I am displaying my array by using var_dump I get the following result:
array(1) { [0]=> NULL }
I want to apply a condition that when my array has a null value it should do something. I have tried using array[0]== NULL and array[0]= NULL inside my condition but it does not work. Can anyone tell me what could be the correct condition for it?
if(is_null($array[0])) {}? By the way,==makes a comparison,=is an assignement (even in anifstatement).if(in_array(NULL, $yourArray){}