2, "333"=>3, "444"=>4, "555"=>5);$nums2 = $nums1;echo "";echo "Odd :\n";//回调函数,如果返回true则将">
时间:2021-07-01 10:21:17 帮助过:17人阅读
1, "222"=>2, "333"=>3, "444"=>4, "555"=>5); $nums2 = $nums1; echo ""; echo "Odd :\n"; //回调函数,如果返回true则将$array1中的数据再赋给原数组,键保持不变 print_r(array_filter($nums1, "odd")); echo ""; echo ""; echo "Even:\n"; print_r(array_filter($nums2, "even")); echo ""; ?>