Correcting teacher:PHPz
Correction status:unqualified
Teacher's comments:作业使用markdown语法写,解决方法在群公告的直播答疑汇总的8月2日中
<?php
$arr = [23,3,45,6,78,8,34];
function getarr()
{
$newarr=array();
$i=0;
global $arr;
foreach($arr as $arrs)
{
if($arrs%2==0):
$newarr[$i]=$arrs;
$i++;
endif;
}
return $newarr;
};
echo '<pre>';
print_r(getarr()) ;