RE: [PHP-ES] Agregar <enter>
| From: | Victor Hugo Ganoza Gomez | Date: | Mon, 11 Dec 2000 20:49:16 +0000 |
| Subject: | RE: [PHP-ES] Agregar <enter> | ||
| References: | 1 2 3 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-4842@lists.php.net to get a copy of this message | ||
Aldo, no se si entendi bien lo que quieres lograr, pero si ejecuto:
<?php
$exist="false";
for ($contador = 1; $contador < 6; ++$contador) {
$cod = "Noticia $contador";
if ($exist=="false") {
$rt_tot="total.txt";
$agr_tot=fopen($rt_tot,"a");
fwrite($agr_tot,$cod ."\n"); // en esta linea trato de insertar ese enter
pero no funciona alguna sugerencia ???
fclose($agr_tot);
}
}
?>
el contenido del archivo total.txt es:
Noticia 1
Noticia 2
Noticia 3
Noticia 4
Noticia 5
¿Es asi como quieres que quede?. En ese caso, tu codigo funciona, es decir,
al final de cada noticia se introduce un salto de linea.
Saludos
Victor Hugo Ganoza Gómez
http://www.natoom.com
http://www.ganoza.com