Pipes are also good visual delimiters - so if you're reading through output
or looking in your raw data, I find that by scanning for pipes is a lot
easier visually than other sorts of delimiters. I've sometimes used two or
three pipes in a row just to make sure I don't have someone entering a
single pipe to screw up the code or to just make it that much easier to find
in large strings of text.

-M

-----Original Message-----
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 16, 2004 4:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] splitting string

M. Sokolewicz wrote:
> please explain...  WHY is that better?

For me, I'll use pipes because they are so rarely used (if ever) when an 
user is entering text.  If I make my delimiter a newline (or comma, 
etc.), and an end user enters one with whatever they're inputting, it 
will screw up my split.

-- 
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to