PHP interesse |
|
De functie met nl2br
<?php
function nl2brStrict($text, $replacement = '<br />')
{
return preg_replace("((\r\n)+)", trim($replacement), $text);
}
$bericht = $_POST['bericht'];
$bericht = nl2brStrict($bericht);
echo $bericht;
?>
<?php function nl2brStrict($text, $replacement = '<br />') { } $bericht = $_POST['bericht']; $bericht = nl2brStrict($bericht); ?>
|