note 94884 modified in function.nl2br by danbrown
| From: | danbrown@php.net | Date: | Tue, 01 Dec 2009 16:13:17 +0000 |
| Subject: | note 94884 modified in function.nl2br by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163452@lists.php.net to get a copy of this message | ||
Another br2nl-Function. This works with text for textareas too... Other solutions here would result
in \n in the textbox and no wrap.
<?php
function br2nl($string){
$return=eregi_replace('<br[[:space:]]*/?'.
'[[:space:]]*>',chr(13).chr(10),$string);
return $return;
}
?>
GrüÃe!
Sebastian
--was--
Another br2nl-Function. This works with text for textareas too... Other solutions here would result
in \n in the textbox and no wrap.
function br2nl($string){
$return=eregi_replace('<br[[:space:]]*/?'.
'[[:space:]]*>',chr(13).chr(10),$string);
return $return;
}
GrüÃe!
Sebastian
http://php.net/manual/en/function.nl2br.php