I have the array $var, and I\'d like to return FALSE if one or more element in the array are empty (I mean, the string are \"\").
I think that array_filter()
array_filter()
function emptyElementExists($arr) { return array_search("", $arr) !== false; }
Example:
$var = array( "text1", "", "text3" ); var_dump( emptyElementExists($var) );
Output:
bool(true)
Reference