note 30203 deleted from function.array-filter by didou
| From: | didou@php.net | Date: | Wed, 12 Nov 2003 21:07:44 +0000 |
| Subject: | note 30203 deleted from function.array-filter by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-60320@lists.php.net to get a copy of this message | ||
Note Submitter: muell-spam-trash-abfall@kcet.de
----
array_filter() has a second parameter callback_function which is optional.
If you call array_filter() without it, it will remove all values that are
equal to the false values listed in http://de3.php.net/manual/en/language.types.boolean.php
#language.types.boolean.casting [one line link]
from the array.
Example:
$a = array(0 => 0,
1 => '',
2 => 'foo',
3 => false);
$a = array_filter($a);