array:2 [▼
"aa" => array:6 [▼
"comboNameId" => 1
"sku" => "aa"
"lineItem" => "x"
"qty" => 1
"lineItem1" => "y"
"qty1" => 2
]
"bb" => array:8 [▼
"comboNameId" => 1
"sku" => "bb"
"lineItem" => "111"
"qty" => 111
"lineItem1" => "222"
"qty1" => 2
"lineItem2" => "333"
"qty2" => 3
]
]這個是我循環(huán)得到的一個數(shù)組,現(xiàn)在我需要找到這個二維數(shù)組最多個數(shù)的那一個放到數(shù)組最上面去就好,不需要將數(shù)組進行排序。請問如何實現(xiàn)呀?
二維數(shù)組如何找到數(shù)組內(nèi)元素個數(shù)最多的放到數(shù)組最前面?
交互式愛情
2018-07-17 17:25:05