How about this:
fputs($fic,"on a new line\n");
This works in c.
> Hi all,
> I' m searching how to write in a file on a new line each times whith
> fputs().
> Because i want read the file whith file() and so ,have one line per indice
> in a table.
> So i need to write on a new line each time.
> <?
> $fic = fopen("toto.txt","a+");
> fputs($fic,"on a new line");
> fclose($fic);
>
> ?>
> <?
> $tab = file("toto.txt");
> for($i=0;$i<count($tab);$i++){
> echo "$tab[$i]";
> }
>
> ?>
>
> TIA.
> arnaud.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-Pushkar S. Pradhan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php