标签: php
可能重复: Why does PHP overwrite values when I iterate through this array twice (by reference, by value)
$arr=array('a','b','c'); foreach($arr as &$v){ echo $v; } foreach($arr as $v){ echo $v; }
结果是abcabb,而不是abcabc,为什么?