note 24894 rejected from function.nl2br by betz
| From: | betz@php.net | Date: | Wed, 04 Sep 2002 11:52:28 +0000 |
| Subject: | note 24894 rejected from function.nl2br by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36099@lists.php.net to get a copy of this message | ||
nl2br() doesn't seem to work with readfile. E.g.
<?php
print nl2br(readfile("file.txt"));
?>
won't work. At least not for me...
I used:
<?php
$in = file("file.txt");
foreach ($in as $out) {
print nl2br($out);
}
?>
instead.