function bb_to_html ($input)
{
$pattern[0] = "/[url=((f|ht)tp[s]?://[^<> \n]+?)](.+?)[/url]/i";
$replacement[0] = '<a href="\1" target="_blank">\3</a>';$pattern[1] = usw...";
$replacement[1] = 'usw...';
Problemfall Zeile 10:
$input = preg_replace($pattern, $replacement, $input);
[...]
return $input;
}
Erstmal Danke! Aber es erscheint ein Fehler:
Warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in C:\xampplite\htdocs\pageedit.php on line 10
Und B, I und normale URL's gehen nicht:
Mein Code:
[b]Hallo Mama![/b]
[i]HAHA![/i][url]http://www.url.de[/url]
[url=http://www.url.de]goto the url[/url]
Hier wird nur die 2. url unterstrichen!