我有以下数组
Array
(
[0] => Array(
[0] => Water
[1] => 0.5555)
[1] => Array(
[0] => Jojoba Oil
[1] => 1)
[2] => Array(
[0] => Water
[1] => 0.3)
[3] => Array(
[0] => Coconut Extract
[1] => 1.2)
[4] => Array(
[0] => Walnut Extract
[1] => 1.1)
[5] => Array(
[0] => Water
[1] => 0.5555)
[6] => Array(
[0] => Peptide 1
[1] => 2)
[7] => Array(
[0] => Preservative
[1] => 0.5555)
)
我需要以下输出(通过添加重复键的值并显示一次,例如'Water')
Array(
[Peptide 1] => 2
[Water] => 1.411
[Coconut Extract] => 1.2
[Walnut Extract] => 1.1
[Jojoba Oil] => 1
[Preservative] => 0.5555
)
并按desc顺序排序 Thanx提前...