这是我的代码
<?php$arr=array(1,2,3,4,5,6,7,8,9,10,11,12);$exhcanged_arr=array_filter($arr,"myfun");function myfun($n){ if($n%2==0) return 0; else return 1;}echo '<pre>';print_r($exhcanged_arr);echo '</pre>';?>
但输出却是这个样子
温馨提示:答案为网友推荐,仅供参考