note 117059 deleted from function.empty by cmb
| From: | cmb@php.net | Date: | Fri, 26 Apr 2019 16:54:30 +0000 |
| Subject: | note 117059 deleted from function.empty by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210678@lists.php.net to get a copy of this message | ||
Note Submitter: jeanbadel at gmail dot com
----
Add a empty recursive
function is_empty($field) {
return array_reduce($field, function($acc, $value){
if ($acc === false) {
return false;
}
return (is_array($value)) ? is_empty($value) : empty($value);
});
}