Ver Mensaje Individual
  #7 (permalink)  
Antiguo 11/04/2008, 10:21
usermax
(Desactivado)
 
Fecha de Ingreso: diciembre-2006
Mensajes: 529
Antigüedad: 17 años, 5 meses
Puntos: 11
Re: Como enviar una matriz a un archivo

...otra forma es usar:

implode("\n",$m);

Quedaría:

Código PHP:
$m = array(); 
$m[0] = "1\td1\t21\n"
$m[1] = "1\td2\t22\n"
$m[2] = "1\td3\t23\n"
$m[3] = "1\td4\t24\n";
 
// Lo guardemos
file_put_contents('foo.txt',implode("\n",$m));