Bug #12762 Updated: nl2br -- Converts newlines to HTML line breaks

From: Date: Wed, 15 Aug 2001 11:30:11 +0000
Subject: Bug #12762 Updated: nl2br -- Converts newlines to HTML line breaks
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63266@lists.php.net to get a copy of this message
ID: 12762 Updated by: sniper Reported By: dorogov@zmail.ru Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 4.0.6 New Comment: This is intended. Search the bug db for better explanation..and read the bugs-dos-and-donts next time BEFORE submitting bug reports. Previous Comments: ------------------------------------------------------------------------ [2001-08-15 07:25:51] dorogov@zmail.ru <? $test = fopen("test1.txt", "r") or die("unable to open file"); while (!feof($test)) { $line = fgets($test, 1024); $line = nl2br($line); print $line; } ?> contents of file test1.txt: test test test In HTML: test<br /> test<br /> test<br /> That is to say <br /> instead of <br> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12762&edit=1

« previous php.dev (#63266) next »