note 78595 added to function.array-merge

From: Date: Thu, 18 Oct 2007 14:45:06 +0000
Subject: note 78595 added to function.array-merge
Groups: php.notes 
Request: Send a blank email to php-notes+get-131504@lists.php.net to get a copy of this message
Re: Renumbering arrays: This (from rcarvalhoREMOVECAPS at clix dot pt): $a = array_merge($a, null); does not renumber the array in PHP5. However this: $a = array_merge($a, array()); does renumber the $a array in PHP5. I think that's more clear than the other renumbering proposal, though I don't know about performance: $b = implode(" ", $a); $a = explode(" ", $b); Hope this helps... ---- Server IP: 208.69.120.35 Probable Submitter: 66.63.101.227 ---- Manual Page -- http://www.php.net/manual/en/function.array-merge.php Edit -- https://master.php.net/note/edit/78595 Del: integrated -- https://master.php.net/note/delete/78595/integrated Del: useless -- https://master.php.net/note/delete/78595/useless Del: bad code -- https://master.php.net/note/delete/78595/bad+code Del: spam -- https://master.php.net/note/delete/78595/spam Del: non-english -- https://master.php.net/note/delete/78595/non-english Del: in docs -- https://master.php.net/note/delete/78595/in+docs Del: other reasons-- https://master.php.net/note/delete/78595 Reject -- https://master.php.net/note/reject/78595 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131504) next »