note 19481 added to function.split
| From: | shai at comfy dot co dot il | Date: | Thu, 28 Feb 2002 17:40:18 +0000 |
| Subject: | note 19481 added to function.split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27178@lists.php.net to get a copy of this message | ||
Doing a split on an empty string results in an array containing one empty string element. This is
correct but counter intuitive (at lease for me it was).
Example:
$split_string = split(:, );
print (count($split_string));
will print:
1
--
http://www.php.net/manual/en/function.split.php
http://master.php.net/manage/user-notes.php?action=edit+19481
http://master.php.net/manage/user-notes.php?action=delete+19481
http://master.php.net/manage/user-notes.php?action=reject+19481