Cita:
Iniciado por hhs
Aun con el array_filer sigue el código no hace lo que pidieron
No aportas mucho, aparte de decir no funciona
Código PHP:
Ver original$array_madre = Array("oso","perro","león","gato","tigre","tigre","perro","perro","perro","león","oso","oso","oso","oso","","","","","","tigre","tigre","tigre","gato","elefante","gato","perro","oso","oso"); $temp = null;
$x = 1;
foreach ($origen as $valor) {
echo $valor . "<br>";
if ($actual == 0) {
} else {
$x = 1;
}
$temp = $valor;
}
echo "El elemento " .ucwords($llave[0]). " se repite " .$valor[0]. " veces consecutivas";