Diese Methode funktioniert bei meinem Forum wunderbar: PHP-Code: $text = preg_replace("#\[list\]\r\n(.+)\[/list\]#Uis", "<ul>\\1</ul>", $text); $text = preg_replace("#\[list\]\n(.+)\[/list\]#Uis", "<ul>\\1</ul>", $text); $text = preg_replace("#\[list\](.+)\[/list\]#Uis", "<ul>\\1</ul>", $text); $text = preg_replace("#\[\*\](.+)\n#Uis", "<li>\\1</li>", $text);
$text = preg_replace("#\[list\]\r\n(.+)\[/list\]#Uis", "<ul>\\1</ul>", $text); $text = preg_replace("#\[list\]\n(.+)\[/list\]#Uis", "<ul>\\1</ul>", $text); $text = preg_replace("#\[list\](.+)\[/list\]#Uis", "<ul>\\1</ul>", $text); $text = preg_replace("#\[\*\](.+)\n#Uis", "<li>\\1</li>", $text);
Foren-Regeln