note 48365 added to function.array-merge-recursive
| From: | fire at firepages dot com dot au | Date: | Tue, 21 Dec 2004 03:10:22 +0000 |
| Subject: | note 48365 added to function.array-merge-recursive | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-82106@lists.php.net to get a copy of this message | ||
PHP5 note , in PHP4 you could pass an uninitialised array to array_merge_recursive which would issue
a notice but not break anything ..
while( $whatever){
$uninitialised_array = array_merge_recursive( $uninitialised_array, $t ) ;
}
in PHP5 , if you dont initialise the array the recursion never starts so $uninitialised_array =
array(); solves (good practive anyway I suppose?)
----
Manual Page -- http://www.php.net/manual/en/function.array-merge-recursive.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48365
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48365&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48365&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48365&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48365&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48365&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48365&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48365&report=yes
Search -- http://master.php.net/manage/user-notes.php