note 90617 added to function.array-filter
| From: | chrisstocktonaz at gmail dot com | Date: | Thu, 30 Apr 2009 16:34:06 +0000 |
| Subject: | note 90617 added to function.array-filter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154052@lists.php.net to get a copy of this message | ||
I use the following to see if a array consist of scalar values or null, but of course you could mix
it up using any of the is_ functions.
if(count($data) !== count(array_filter($data, 'is_scalar') + array_filter($data,
'is_null'))) {
throw new Exception('Array did not consist of scalar and null values');
}
----
Server IP: 208.69.120.35
Probable Submitter: 64.202.160.65
----
Manual Page -- http://www.php.net/manual/en/function.array-filter.php
Edit -- https://master.php.net/note/edit/90617
Del: integrated -- https://master.php.net/note/delete/90617/integrated
Del: useless -- https://master.php.net/note/delete/90617/useless
Del: bad code -- https://master.php.net/note/delete/90617/bad+code
Del: spam -- https://master.php.net/note/delete/90617/spam
Del: non-english -- https://master.php.net/note/delete/90617/non-english
Del: in docs -- https://master.php.net/note/delete/90617/in+docs
Del: other reasons-- https://master.php.net/note/delete/90617
Reject -- https://master.php.net/note/reject/90617
Search -- https://master.php.net/manage/user-notes.php