|
Posted by friglob on 09/10/06 03:39
Lets say i have these two arrays (PHP 4.3.3)
$arr_1 = array( [left] => 22,
[up] => 4,
[right] => 10
);
$arr_2 = array( [bottom] => 13,
[up] => 6,
[right] => 12
);
I need to get the new array which would look like this:
$arr = array( [left] => 22,
[up] => 10,
[right] => 22,
[bottom] => 13
);
the thing is that i should put two arrays into one by this rules:
for same keys create one key with value of all values of that key
for different keys just create their key with their value
how to do it?
thank you very much
Navigation:
[Reply to this message]
|