简单教程
提交运行
代码编辑器:
<?php function test_odd($var) { return (intval($var) & 1); } $a1 = array("a","b",2,3,4); print_r(array_filter($a1,"test_odd"));
运行结果: