The arrays are:
The index for each array is an ID which i would like o be part of the new array, so i would like it to look something like this:
PHP would be nice, but I'm stuck on logic, not syntax, so anything that can help is great.
Thanks
Something like:
function merge_arrays($arrArrays) { $arrNew = array(); foreach ($arrArrays as $arrName=>$arrData){ foreach ($arrData as $key=>$value){ $arrNew[$key][$arrName]=$arrData; } }//end foreach
return $arrNew; }//end function
function __construct() { //constructor code here } }
then create the array and populating it with instances of the class.
(i've never actually done this other than in C++ and Java but I'm assuming that using your sais of PHP syntax you could get it popping.)