Chris W. Parker wrote:

Justin Patrin <mailto:[EMAIL PROTECTED]>
    on Monday, December 08, 2003 4:39 PM said:


If all you want to do is give an array to another
script, sure you can delimit (although that's much more error prone
than serializing).


Serialize, delimit. It's pretty much the same idea.



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

Not really. If you just delimit, you have to worry about escaping that value in your string somehow. If your delimiter was ',' say and you had one in a field, how would you handle it?


In addition, serializing is part of PHP, so you know that what you put in is what you get out. Writing your own simple serialization through delimiting is just asking for problems. What if, say, the array has textual keys instead of just numbered ones? Or the array has three indices? Or one of the values is an object? Using serializa() and unserialize() means that you don't EVER have to worry about this (unless there are errors in these functions, in which case, you submit a bug report and it gets fixed).

--
paperCrane <Justin Patrin>

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



Reply via email to