d40sithui

msg:3914608 | 6:48 pm on May 15, 2009 (gmt 0) |
Could be as simple as writing a loop of some sort. Can you show us the arrays?
|
noyearzero

msg:3915777 | 2:05 pm on May 18, 2009 (gmt 0) |
$arr1[key][test][1] = '1' ; $arr1[key][test][2][a] = '2a' ; $arr1[key][test][2][b] = '2b' ; $arr1[key][test][2][c] = '2c' ; $arr1[key][test][2][d][i] = '2di' ; $arr1[key][test][2][d][ii] = '2dii' ; $arr1[key][test][3] = '3' ; $arr1[key][test][4] = '4' ; $arr2[test][1] = '1-overwritten' ; $arr2[test][2][a] = '2a-overwritten' ; $arr2[test][2][d][ii] = '2dii-overwritten' ; and i want it to result in: $arr3[key][test][1] = '1-overwritten' ; $arr3[key][test][2][a] = '2a-overwritten' ; $arr3[key][test][2][b] = '2b' ; $arr3[key][test][2][c] = '2c' ; $arr3[key][test][2][d][i] = '2di' ; $arr3[key][test][2][d][ii] = '2dii-overwritten' ; $arr3[key][test][3] = '3' ; $arr3[key][test][4] = '4' ;
|
d40sithui

msg:3916054 | 9:17 pm on May 18, 2009 (gmt 0) |
Hm.. this is a bit more complicated that I anticipated lol... I am running php 4 so I haven't been able to play with all the new php array functions. If you are in the same boat, likely you'll have to write a function. array_merge($arr1, $arr2) returns $arr2. Perhaps if you have php 5 you can do array_merge() -> array_combine(). Sorry, I can't be of any help - looks like this is one tough egg to crack! Good luck.
|
acemaster

msg:3916098 | 11:08 pm on May 18, 2009 (gmt 0) |
[php.net...] Might have the answer you are looking for.
|
|