removing line breaks

From: Date: Fri, 05 Dec 2003 08:53:32 +0000
Subject: removing line breaks
Groups: php.general 
Request: Send a blank email to php-general+get-171956@lists.php.net to get a copy of this message
Hi I want to remove line breaks from the front of a string, but i can't get it to work. Who can help me? The code i tried is: while(substr($body,0,1)=="\n") $body=substr($body,1); i also tried: while(substr($body,0,2)=="\n") $body=substr($body,2); but this doesn't work either. Both codes WON'T remove line breaks in the body string. Note that i only want to remove line breaks in the start of the string, all line breaks in the rest of the string should remain. Who can help me? Thnx -- Regards, Roel Derckx aka ThunderStrike Main Organizer Ambience 98-2002 [ www.ambience.nl ] Chairman & Sponsoring Manager Ambience Foundation

« previous php.general (#171956) next »