Hallo,
ich mal wieder ^^
habe ne Funktion die aus BBC Code HTML Tags erstellt.
hier mal ein auszug
das problem ist nun das wenn ich in einen text eine tabelle erstelle gibt er mir das so aus
das liegt sicher daran das ich \n mit <br> ersetze.
im Textfeld gebe ich das so ein
wenn ich jedoch
schreibe klabbt die ausgabe auch wunderbar
Kann man dies beheben ohne das ich das mit \n wird zu <br> rausnehmen muss?
Wäre dankbar für Tips und Hilfe
Lg
ich mal wieder ^^
habe ne Funktion die aus BBC Code HTML Tags erstellt.
hier mal ein auszug
PHP-Code:
$bb = preg_replace('/\n/', "<br>", $bb);
$bb = preg_replace('#\[table\](.*)\[/table\]#isU', "<table>\n$1</table>\n", $bb);
$bb = preg_replace('#\[tr\](.*)\[/tr\]#isU', "<tr>\n$1</tr>\n", $bb);
$bb = preg_replace('#\[td\](.*)\[/td\]#isU', "<td>$1</td>\n", $bb);
PHP-Code:
<table><br><tr><br><td>...
im Textfeld gebe ich das so ein
Code:
text text text
Code:
text text text
PHP-Code:
<table>
<tr>
<td>...
Wäre dankbar für Tips und Hilfe
Lg
Kommentar