foreach遍历输出结果不对?
<?php
$fruit = array('apple','pear');
foreach($fruit as $key =>$value){
print_r($fruit);
}
?>
上述代码,为啥数组结果,出现了两次?
<?php
$fruit = array('apple','pear');
foreach($fruit as $key =>$value){
print_r($fruit);
}
?>
上述代码,为啥数组结果,出现了两次?
2016-09-20
举报