note 26643 deleted from function.array-merge by sniper
| From: | sniper@php.net | Date: | Mon, 06 Oct 2003 22:54:52 +0000 |
| Subject: | note 26643 deleted from function.array-merge by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57918@lists.php.net to get a copy of this message | ||
Note Submitter: cnc2dude@earthlink.net
----
Make sure that if you try to use the + operator to join two arrays that the two arrays you are
merging exist and are arrays. I got an error with the code:
$GLOBALS[txt] = $GLOBALS[txt] + $txt;
Until I added this above it:
if (!is_array($GLOBALS[txt])) {
$GLOBALS[txt] = array();
}