I am using array_filter in php:
$new_array = array_filter($updated, "check_if_value_is_null_or_false");
function check_if_value_is_null_or_false($val) {
return !is_null($val);
};
I understand that I can use is_null to filter out anything that has null value.
I also want to add a condition for string "False" as the value.
How would I modify the above?
"False"or thefalsevalue as a Boolean?check_if_value_is_null_or_falseas you would returntrueif the value isnullor"False". Although inside you are returning "not null", would you want to return thetruevalue orfalsefor the second one?