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.

PHP Stringwert umwandeln

Empfohlene Antworten

Hi,

habe einen String in dem Text gespeichert ist und das auch Umbrüchen (RETURN bzw. ENTER) enthält und ich muss aber das Zeichen umwandeln in ein <br>, das macht man normaler Weise ja über die Funktion:

echo str_replace(" ","<br>","$text");

aber der PHP Compiler erkennt wohl ASCII bzw. HEX Code nicht als solches und wandelt mir die Zeichenkette nicht um.

Und so langsam bekomme ich nen dicken Hals....

Also wenn jemand weiß wie ich nen Zeilenumbruch in ein <br> umwandel, sofort melden....

Brauche das um ein TEXT String in HTML wiederzugeben, aber auch mit den orginal Umbrüchen und nicht so wie er halt lustig ist...

THX DePlague

Da gibts ne eigene Funktion für:

nl2br("String");

nl2br heißt: "New Line to br"

danke, geht...

ich war eigendlich der meinung das ich das über den HEX bzw. ASCII Code hätte machen müssen aber hauptsache es geht...

Mal einmal mehr das Leben gerettet...

Gehört nämlich zu meinem Abschlußprojekt! So dann läuft jetzt alles, jetzt gehts an die Doku....

THX @ einen schönen So. Abend noch

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.