Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

HTML Formatierungungen aus String entfernen

Empfohlene Antworten

preg_replace.

du suchst einfach nach <></> und entfernst diese.

ein muster könnte so in etwas aussehen:

preg_replace("°<\w+(\s)?=\"(.*)\">(.*)</\w+>°is","\\3",$text);

ich hoffe mal das es wenigstens etwas klappt, habs jetzt nicht probiert :)

  • Autor

Genau das ist die Idee. Einfach die < und > Zeichen entfernen.

Bei deinem Beispiel habe ich immer einen Fehler bekommen.

Ich habe jetzt in SelfPHP eine Funktion gefunden die sowas auch macht.

$array_1 = array("<",">","[B]","[/B]");
$array_2 = array("","","<b>","</b>");

for($x=0;$x<4;$x++)
{
$beitrag_anzeigen = str_replace($array_1[$x],$array_2[$x],$beitrag_anzeigen);
}
[/CODE]

Frank

Hmm, nette Ansaetze.

Aber PHP hat die nette Funktion strip_tags() die genau das macht :-))

Michael

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.