RE: [PHP-WIN] reading txt files and writing it to the screen
| From: | Greg Bair | Date: | Thu, 08 May 2003 17:21:59 +0000 |
| Subject: | RE: [PHP-WIN] reading txt files and writing it to the screen | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19807@lists.php.net to get a copy of this message | ||
There's a function called nl2br(). It places browser-friendly <br />
tags before every EOL character. Just take the variable you're printing
and put it in nl2br(). If it's $i, for instance:
print nl2br($i);
or
nl2br($i);
print $i;
GWB
> -----Original Message-----
> From: Iggy [mailto:ifran@winegard.com]
> Sent: Thursday, May 08, 2003 12:10 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] reading txt files and writing it to the screen
>
> I am not sure if this is even possible, but I would hope it is. Surely
I
> am
> doing something wrong, but this is my problem:
>
> I have a .txt file that I would like to open and read line by line and
> then
> print this .txt file to the screen. However, I get one big chunk of
text,
> because the EOL characters are not recognized.
>
> How do I fix this?
>
> Thanx
> Iggy
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php