note 10333 added to nl2br

From: Date: Thu, 28 Dec 2000 21:56:17 +0000
Subject: note 10333 added to nl2br
Groups: php.notes 
Request: Send a blank email to php-notes+get-9160@lists.php.net to get a copy of this message
WHY IN THE HELL DO PEOPLE PUT <PRE> with the php code Like Idiots <pre> $text = nl2br(text); $text = ereg_replace("\n", "", $text); $text = ereg_replace("\r", "", $text); </pre> THAT IS WRONG!!!!!!!!!!!!!!!! It should be <pre> <? $text = nl2br(text); $text = ereg_replace("\n", "", $text); $text = ereg_replace("\r", "", $text); ?> </pre> OR print("<pre>"); $text = nl2br(text); $text = ereg_replace("\n", "", $text); $text = ereg_replace("\r", "", $text); print ("</pre>"); http://www.php.net/manual/function.nl2br.php

« previous php.notes (#9160) next »