获取 PHP 数组中的最小值和最大值
我有一个这样的数组:
array (0 =>
array (
'id' => '20110209172713',
'Date' => '2011-02-09',
'Weight' => '200',
),
1 =>
array (
'id' => '20110209172747',
'Date' => '2011-02-09',
'Weight' => '180',
),
2 =>
array (
'id' => '20110209172827',
'Date' => '2011-02-09',
'Weight' => '175',
),
3 =>
array (
'id' => '20110211204433',
'Date' => '2011-02-11',
'Weight' => '195',
),
)
我需要提取最小和最大权重值。在此示例中
$min值 = 175
$max值 = 200
关于如何做到这一点的任何帮助?谢谢!