note 52407 added to function.array-merge

From: Date: Fri, 29 Apr 2005 17:28:10 +0000
Subject: note 52407 added to function.array-merge
Groups: php.notes 
Request: Send a blank email to php-notes+get-88763@lists.php.net to get a copy of this message
Uh, yeah, probably obvious to some, but doing an array_merge() that includes any unset/undefined/null/nonexistent variable/array gives an unset/undef/null/nonexist result. $a=array("1", "2"); unset($q); $z=array_merge($a, $q); print_r($z); echo $z; results in nothing. It probably makes technical sense at some low level, but it is humanly nonsensical: you take nothing and add it something and you get nothing?? ---- Manual Page -- http://www.php.net/manual/en/function.array-merge.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52407 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52407&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52407&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52407&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52407&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52407&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52407&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88763) next »