Regulärer Ausdurck
bey0nd
- php
Hallo
Ich hab einen text:
text
text
text
[tabelle]
asdf asdf asdf
asdf asdf asdf
asdf asdf asdf
[/tabelle]
text
text
text
Jetzt möchte ich [tabelle] in <pre> umwandeln und \n in <br> allerding möchte ich zwischen den beiden [tabelle] keine <br>.
ich habe bis jetzt
$message = preg_replace("/\[tabelle\](.*?)\[\/tabelle\]/si", "<pre>\\1</pre>", $message);
$text=ereg_replace ("\n", "<br>", $message);
Kann ich automatisch das \n zwischen den beiden [tabelle] wegfallen lassen/löschen?