Re: splitting string

From: Date: Tue, 16 Nov 2004 21:38:45 +0000
Subject: Re: splitting string
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-202225@lists.php.net to get a copy of this message
On Nov 16, 2004, at 2:46 PM, M. Sokolewicz wrote:
Afan Pasalic wrote:
Chris W. Parker wrote:
Yes. $string = "$string1|$string2|$string3|$string4|$string5"; $string_back = explode("|", $string);
Ok, I'm going to change the code and use pipes :) Thanks to all of you.! -afan
please explain... WHY is that better?
[a bit of sarcasm, but somewhat true] That's easy. | is only 1 character and \n is 2! Newlines are also used everywhere - pipe occurs less often. [/a bit of sarcasm, but somewhat true] Just a thought, ~Philip

« previous php.general (#202225) next »