//luego recorres ese array foreach($numeros as $k => $num){ if($count == "" || $num > $count){ $count = $num; $nun = $k; } } echo "El numero".$nun ." se repite ".$count ." veces";