我的代码是:
$dataBerita = array(
'Babakan' => array(5),
'Babakan Pasar' => array(30),
'Bantar Jati' => array(70),
'Baranang Siang' => array(50),
'Batutulis' => array(40),
'Bojongkerta' => array(25),
'Bondongan' => array(90),
'Ciampea' => array(5),
'Cibadak' => array(2),
'Cilubang' => array(6)
);
array_multisort($dataBerita, SORT_DESC);
foreach ($dataBerita as $key => $value) {
echo $value.", ";
}
我想显示10个数据数组中最大的5个数据数组,如下所示:
90,70,50,40,30,
慕的地8271018