note 26643 added to function.array-merge

From: Date: Fri, 08 Nov 2002 01:59:18 +0000
Subject: note 26643 added to function.array-merge
Groups: php.notes 
Request: Send a blank email to php-notes+get-39125@lists.php.net to get a copy of this message
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(); } -- http://www.php.net/manual/en/function.array-merge.php http://master.php.net/manage/user-notes.php?action=edit+26643 http://master.php.net/manage/user-notes.php?action=delete+26643 http://master.php.net/manage/user-notes.php?action=reject+26643

« previous php.notes (#39125) next »