$peopleNum){ if(!array_key_exists($peopleNum,$getPoint)){ $getPoint[(int)$peopleNum]=(int)$quizPoint[$key]; }else{ $getPoint[(int)$peopleNum]+=(int)$quizPoint[$key]; } } if(max($getPoint)==$getPoint[0]){ echo "YES"; }else{ echo "NO"; }