WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   chomp in PHP (http://www.wcm.at/forum/showthread.php?t=19771)

Philipp 23.04.2001 00:06

Gibt es in PHP einen Befehl der das gleiche bewirkt wie chomp in Perl :confused:

chomp entfernt unter Perl Zeilenumbrüche z.b. wird aus

Code:

Eins

Zwei

Drei

ein

Code:

Eins
Zwei
Drei


Who-T 23.04.2001 01:04

chop
würd ich sagen

http://www.php4-forum.de/befehle/chop.htm

Philipp 23.04.2001 02:10

Mit chop funktioniert es nicht. Ich habe in der Zwischenzeit aber eine Lösung gefunden:

preg_replace("/\s/"," ",$variable);



Alle Zeitangaben in WEZ +2. Es ist jetzt 15:30 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag