- var_dump: documentation ( source)
- array_filter: documentation ( source)
<?php
$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
function test($item)
{
if($item == 'orange')
return false;
return true;
}
array_filter($fruits, 'test');
var_dump($fruits);