note 73943 deleted from function.array-merge by bjori

From: Date: Sat, 14 Apr 2007 09:54:35 +0000
Subject: note 73943 deleted from function.array-merge by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125394@lists.php.net to get a copy of this message
Note Submitter: ---- To jnothman at student dot usyd dot edu dot au >>If you have a two dimensional array, or otherwise an array of arrays, the following may be >>handy: >> <?call_user_func_array('array_merge', $arr);?> I avoid of using call_user_func, eval etc, at least, when they are outside of an expression; when you're using a IDE, they can be quite interfering with things like code assist. But, instead you can use the following, faster way: <? $res = array_reduce('array_merge',$arr,array()); ?>

« previous php.notes (#125394) next »