Re: explode this, heheh J/K Explode adds a space ?

From: Date: Fri, 15 Dec 2000 12:28:38 +0000
Subject: Re: explode this, heheh J/K Explode adds a space ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30497@lists.php.net to get a copy of this message
Hi Brandon! You have a quote problem try this code... <?php $log="a\nb\nc\nd" ; $log2 = explode('\n', $log) ; $log3 = explode("\n", $log) ; $i=0; while( $log2[$i] ) { // one space print( $log2[$i++] ); } print( "<br>" ) ; $i=0; while( $log3[$i] ) { // no space print( $log3[$i++] ); } ?> Regards Marcelo Gulin Brandon Orther escribió: > Hello, > > Does anyone know why: > > $log2 = explode("\n", $log); > > adds a space to the end of each element in the array? > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon@webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#30497) next »