Frank
Neues Mitglied
warum funktioniert in diesem script nl2br nicht?
!isU","<div style=';color:#990000;padding:5px;font-family:Courier;border:dashed 1px black;'>$1</div>",$str);
echo $str;
?>
Vorschau schließen
</body>
</head>[/code]
Code:
<html>
<head></head>
<body>
<?
$str = $_REQUEST['text'];
$str = htmlentities($str);
$str = nl2br($str);
$str = preg_replace("!\[b\](.*)\[/b\]!isU","[b]$1[/b]",$str);
$str = preg_replace("!\[i\](.*)\[/i\]!isU","[i]$1[/i]",$str);
$str = preg_replace("!\[u\](.*)\[/u\]!isU","<u>$1</u>",$str);
$str = preg_replace("!\[url\](.*)\[/url\]!isU","<a href=\"$1\">$1</a>",$str);
$str = preg_replace("!\[url=(.*)\](.*)\[/url\]!isU","<a href=\"$1\" style='padding:0px;color: #990000;'>$2</a>",$str);
$str = preg_replace("!\[img\](.*)\[/img\]!isU","<img src=\"$1\">$1</img>",$str);
$str = preg_replace("!\[code](.*)\
echo $str;
?>
Vorschau schließen
</body>
</head>[/code]