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

From: Date: Wed, 15 Aug 2001 11:25:51 +0000
Subject: Bug #12762: nl2br -- Converts newlines to HTML line breaks
Groups: php.dev 
Request: Send a blank email to php-dev+get-63265@lists.php.net to get a copy of this message
From: dorogov@zmail.ru Operating system: Linux PHP version: 4.0.6 PHP Bug Type: Unknown/Other Function Bug description: nl2br -- Converts newlines to HTML line breaks <? $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 bug report at: http://bugs.php.net/?id=12762&edit=1

« previous php.dev (#63265) next »