<?php
$sum=0;
$tem=array("one","two","three","four","five","three","two");
for($i=0;$i<count($tem);$i++){
for($j=$i+1;$j<count($tem);$j++){
if($tem[$i]==$tem[$j]){
$temp=$tem[$i];
$sum++;
}
}
}
echo '<br>在此数组中有<font color=red size=7>'.$sum.'</font>组值相等';
echo $temp;
?>
请问一下各位高手:为什么echo $temp 只能打印出"three",要怎么样才能在for循外把所有想得到的值都打印出来,谢谢!