对不起,为什么这不能工作:
function filter($var) {
return($var['id'] < 4);
}
$t1 = array(
array("key"=>"date", "value"=>"effe", "id"=>2),
array("key"=>"date2", "value"=>"jieffe", "id"=>3),
array("key"=>"date3", "value"=>"efjife", "id"=>4),
array("key"=>"date4", "value"=>"effijoe", "id"=>5),
);
array_filter($t1, "filter");
var_dump($t1);