bubbles Posted December 5, 2013 Report Posted December 5, 2013 (edited) Am un array sub forma :Array ( [28] => Array ([nr] => 1 [pauza] => 2 [maxim] => 3[aparitie] => 4 )[29] => Array ( [nr] => 5 [pauza] => 6 [maxim] => 7 [aparitie] => 8 ))Cum pot sa sortez valorile ascending de exemplu dupa [maxim] ? Edited December 5, 2013 by bubbles Quote
eusimplu Posted December 5, 2013 Report Posted December 5, 2013 Vezi daca reusesti cu PHP: usort - Manual, daca nu atunci nu ar trebui sa-ti ia mai mult de un minut crearea unui algoritm cu foreach. Quote
sclipici Posted December 5, 2013 Report Posted December 5, 2013 $rst[] = array('ceva' => 'da', 'altceva' => 1);$rst[] = array('ceva' => 'nu', 'altceva' => 2);$rst[] = array('ceva' => 'nu', 'altceva' => 3);foreach($rst as $k => $v) { $r[$k] = $v['altceva'];}array_multisort($r, SORT_ASC, $rst);print_r($rst); Quote