From: Arlo L. <ar...@ar...> - 2009-02-23 17:45:21
|
Hello again, Rich wrote: > One reason why explode does what is does is so that it is the exact > reverse of implode (and vice versa) > > What would you expect these to output: > > implode('|', array('foo', 'bar', 'baz')); > implode('|', array('foo')); > implode('|', array('')); Very interesting. But here's one more test case; what would you expect this to return? implode('|', array()); An empty string, right? Then, by the same logic, it would be equally correct for explode('|', '') to return array() as array(''). Cheers, -Arlo _______________________________ Arlo Leach 773.769.6106 http://arlomedia.com |