note 22287 deleted from function.explode by spic
| From: | spic@php.net | Date: | Thu, 19 Sep 2002 21:25:13 +0000 |
| Subject: | note 22287 deleted from function.explode by spic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36977@lists.php.net to get a copy of this message | ||
There's one strange behaviour which took me some time to figure out. Having
$s = "a,b,c,<NULL>,e";
$a = explode(",",$s);
for($i = 0; $i < count($a); $i++)
echo "$i: " . $a[$i] . "< br>";
one would expect to get s.th. like
0: a
1: b
2: c
3: <NULL>
4: e
But, not knowing if by intention or confusion with internal value representation the result is:
0:a
1:b
2:c
3:
4:e