[ create a new paste ] login | about

Link: http://codepad.org/RPjvXnro    [ raw code | output | fork ]

PHP, pasted on Sep 14:
1
2
3
4
5
6
7
<?php
$a = array('The','fox',null,'is',false,'indeed','indeed');

function callback($el){
  return $el;
}
print_r(array_unique(array_filter($a,"callback")));


Output:
1
2
3
4
5
6
7
Array
(
    [0] => The
    [1] => fox
    [3] => is
    [5] => indeed
)


Create a new paste based on this one


Comments: