foreach 通过在$value之前加上&很容易就能修改数组的单元,如:
$arr = array(1,2,3,4); foreach($arr as &$value) { $value = $value * 2; } ///现在$arr = array(2,4,6,8);