note 16823 deleted from function.explode by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 21:25:49 +0000 |
| Subject: | note 16823 deleted from function.explode by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22016@lists.php.net to get a copy of this message | ||
It is important to not that explode will re-declare an array. If you have an array in your script
with five elements, and create an array with the same name using explode, all elements of the first
array will be lost.
Example:
$n = array ('zero', 'one', 'two', 'three',
'four');
print $n[4]; // prints four
$n = explode(' ', 'null eins zwei drei'); // array gets re-declared
print $n[4]; // prints nothing(!)
DrTebi