Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:在原来的作业上重新编辑就行了
$arr = [23,3,45,6,78,8,34];
function arrFilter($data){
$newArr = [];
foreach($data as $val){
if(!($val % 2)) array_push($newArr,$val);
}
return $newArr;
}
var_dump(arrFilter($arr));
周末补上