/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Merge a group of arrays * * @param array First array * @param array Second array * @param array Third array * @param array Etc... * @return array All array parameters merged into one */ function amerge() { $r = array(); foreach(func_get_args()as $a) { if (!is_array($a)) { $a = array($a); } $r = array_merge($r, $a); } return $r; }