| 
	
 | 
 Posted by Janwillem Borleffs on 09/10/06 19:53 
friglob wrote: 
> $arr = array( [left]   => 22, 
>       [up]     => 10, 
>       [right]  => 22, 
>       [bottom] => 13 
> ); 
> 
 
function callback(&$item) { 
    if (is_array($item)) $item = array_sum($item); 
} 
$arr_3 = array_merge_recursive($arr_1, $arr_2); 
array_walk($arr_3, 'callback'); 
 
print_r($arr_3); 
 
 
JW
 
  
Navigation:
[Reply to this message] 
 |