Stripping line break characters

From: Date: Sat, 25 Aug 2001 16:27:17 +0000
Subject: Stripping line break characters
Groups: php.general 
Request: Send a blank email to php-general+get-64448@lists.php.net to get a copy of this message
I need to strip line break characters (or whatever the character is that results from users hitting their "enter" key inside a TEXTAREA form input) from a string. These characters will appear anywhere in the string, not just at the end. In perl, the regex would look something like this... $a="a\nb\nc\nd\n\n\n"; $b=$/; $a =~ s/$b//g; # produces "abcd" but i'm a newbie and i don't know how I can translate this to PHP syntax to do the same thing. Any help is appreciated! Thanks! providing the finest in midget technology

« previous php.general (#64448) next »