Re: Simple problem
| From: | Richard KS | Date: | Tue, 19 Feb 2002 14:54:42 +0000 |
| Subject: | Re: Simple problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85430@lists.php.net to get a copy of this message | ||
Or you could just write
<snip>
$fp1 = Fopen("D:\\log.txt","a+");
fwrite($fp1,"$start\n$array[0]\n$array[1]\n");
<snip>
to simplify...
--
Richard,
oblivion creations
http://oblivion.lunamorena.net
oblivion@lunamorena.net
+4+ (0) 736 849 531 for sure contact..
"Jeff Van Campen" <jeffvc@altern.org> wrote in message
news:5.1.0.14.0.20020219100921.00a10290@mail.altern.org...
> > I need insert some variable ito log.txt file but every item (variable)
must
> > be on other line
> > how to do this ?
>
> If I am understanding your question correctly, you need to add a newline
> character (\n) at then end every line. Like so:
>
> $fp1 = Fopen("D:\\log.txt","a+");
> fwrite($fp1,"$start\n");
> fwrite($fp1,"$array[0]\n");
> fwrite($fp1,"$array[1]\n");
> .....
> fwrite($fp1,$end);
> Fclose($fp1);
>
> HTH
> -jeff
>