<?php
$arr =array(
array(1,22,3),
array(4,5,6),
array(11,2,3),
array(1,2,3)
)
foreach($arr as $k=>$v){
$a[$k]=array_sum($v)/count($v);
}
arsort($a);
foreach ($a as $k=>$v){
$new[$k] = $arr[$k];
}print_r($new);
- Output for 5.4.0 - 5.4.31
- Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/IlViF on line 10
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_FOREACH in /in/IlViF on line 10
Process exited with code 255.
preferences:
197.57 ms | 1386 KiB | 68 Q