Decías...
Cita:
Iniciado por abimaelrc
Código PHP:
$getArray = file("texto.txt");
$firstPart = false;
foreach($getArray as $k => $v){
$explodeArray = explode(" ", $v);
if($explodeArray[0] == "dia"){
$firstPart = true;
}
if($firstPart){
echo $v;
}
}
Me dejas saber
Muchas gracias por tu codigo, el cual he implementado asi:
Código PHP:
<?php
$fichero = fopen("texto.txt","r");
while ($linea= fgets($fichero,1024)){
$texto = explode("-", $linea);
if($texto[0] == "2009"){
echo $linea."<br>";
}
}
fclose($fichero);
?>
Abusando de tu sapiencia,
¿Cómo podría hacer para almacenar en un array la fecha, en otro las peras, en otro los limones...?
Gracias de antemano.