Example 2. array_filter() without callback
<?php
$entry = array(
0 => 'foo',
1 => false,
2 => -1,
3 => null,
4 => ''
);
print_r(array_filter($entry));
?>
This will output :
Array
(
[0] => foo
[2] => -1
)
See also array_map(), array_reduce(), and array_walk().
|