How do I get this array:
Array
(
[0] => Array
(
[max] => 5
[year] => 2007
)
[1] => Array
(
[max] => 6.05
[year] => 2008
)
[2] => Array
(
[max] => 7
[year] => 2009
)
)
Into this format:
[year] => [max]
$result = array();
foreach($array as $v) {
$result[$v['year']] = $v['max'];
}
There you go.