I have a multidimensional array

```
$array1 = array(
0 => array(34554, 45, 4545454),
1 => array(434534, 35, 345345),
2 => array(43534, 35, 4343445),
3 => array(35534, 34, 342323)
);
```

Can we find the minimum and maximum value for each value? if we want to find min for first and second column, the other column is max, and the result array is

```
$array2 = array(
0=>34554,
1=>34,
2=>4545454
);
```

i've tried this to get min

```
$result = array(); // save result
array_walk_recursive($ary, function($v, $k) use (&$result) {
if (!isset($result[$k])) $result[$k] = $v;
elseif ($result[$k] > $v) $result[$k] = $v;
});
print_r ($result);
```

and tried this to get max

```
$result = array(); // save result
array_walk_recursive($ary, function($v, $k) use (&$result) {
if (!isset($result[$k])) $result[$k] = $v;
elseif ($result[$k] < $v) $result[$k] = $v;
});
print_r ($result);
```

Thank you.