我有这些数组,我需要做的是让每个数组单独检查 [total],然后得到最大的 5 个数字。我一直在努力,但我的头快要爆炸了,请帮忙!
Array (
[0] => Array ( [id] => 50 [faceid] => 1508653983 [fname] => Mario [lname] => Zelaya [email] => Email [handicap] => Handicap [province] => Province [country] => Country [gender] => male [hand] => [shot1] => Shot #1 [shot2] => Shot #2 [shot3] => Shot #3 [shot4] => Shot #4 [shot5] => Shot #5 [news] => 1 [total] => 0 )
[1] => Array ( [id] => 49 [faceid] => 1665349411 [fname] => Yair [lname] => Villar [email] => servidorv@gmail.com [handicap] => lefthanded [province] => Buenos Aires [country] => Argentina [gender] => male [hand] => RH [shot1] => 200 [shot2] => 98 [shot3] => 98 [shot4] => 98 [shot5] => 98 [news] => 1 [total] => 592 )
[2] => Array ( [id] => 48 [faceid] => 1665349411 [fname] => Yair [lname] => Villar [email] => servidorv@gmail.com [handicap] => lefthanded [province] => Buenos Aires [country] => Argentina [gender] => male [hand] => RH [shot1] => 500 [shot2] => 250 [shot3] => 80 [shot4] => 30 [shot5] => 20 [news] => 1 [total] => 88000 )
)
我怎么能用 php 做这些。请帮忙!!