2
我有關聯數組的數組:如何基於包含的關聯數組在PHP中對數組進行排序?
a[0] = array("value" => "fred", "score" => 10);
a[1] = array("value" => "john", "score" => 50);
a[2] = array("value" => "paul", "score" => 5);
我想基於相關陣列的「分數」值進行排序我的「一個」陣列
它會成爲:
a[0] = array("value" => "paul", "score" => 5);
a[1] = array("value" => "fred", "score" => 10);
a[2] = array("value" => "john", "score" => 50);
有人可以幫我嗎?
優秀的,謝謝,我沒有看到這個功能 – Fredv 2011-02-09 22:51:31