[PHP] Sort multidimensional array - ARGH!

2004-02-05 Thread Kim Steinhaug
I have been messing around now for some hours and Im going mad! Im pulling some heavy data from mySQL with count and grouping, after this I have to calculate som values and then sort the outcome. Therefore Im not able to let mySQL do the accuall sort. So i stuff it into an array, and I need to

Re: [PHP] Sort multidimensional array - ARGH!

2004-02-05 Thread Tom Rogers
Hi, Thursday, February 5, 2004, 11:35:34 PM, you wrote: KS I have been messing around now for some hours and Im going mad! KS Im pulling some heavy data from mySQL with count and grouping, KS after this I have to calculate som values and then sort the outcome. KS Therefore Im not able to let

[PHP] Sort multidimensional array using Natural-Order

2002-08-18 Thread Hessu
Hi, I have following filename/date array Array ( [0] = Array ( [0] = 1.jpg [1] = 10.jpg [2] = 11.jpg [3] = 12.jpg [4] = 2.jpg [5] = 3.jpg [6] = 4.jpg [7] = 5.jpg [8] = 6.jpg [9] = 7.jpg [10] = 8.jpg [11] = 9.jpg ) [1] = Array ( [0] = 1026502301 [1] = 1026502312 [2] = 1026502313 [3] = 1026502550

[PHP] Sort multidimensional array using Natural-Order

2002-08-18 Thread Hessu
Hi, I have following filename/date array Array ( [0] = Array ( [0] = 1.jpg [1] = 10.jpg [2] = 11.jpg [3] = 12.jpg [4] = 2.jpg [5] = 3.jpg [6] = 4.jpg [7] = 5.jpg [8] = 6.jpg [9] = 7.jpg [10] = 8.jpg [11] = 9.jpg ) [1] = Array ( [0] = 1026502301 [1] = 1026502312 [2] = 1026502313 [3] = 1026502550

[PHP] Sort multidimensional array using Natural-Order

2002-08-18 Thread Hessu
Hi, I have following filename/date array Array ( [0] = Array ( [0] = 1.jpg [1] = 10.jpg [2] = 11.jpg [3] = 12.jpg [4] = 2.jpg [5] = 3.jpg [6] = 4.jpg [7] = 5.jpg [8] = 6.jpg [9] = 7.jpg [10] = 8.jpg [11] = 9.jpg ) [1] = Array ( [0] = 1026502301 [1] = 1026502312 [2] = 1026502313 [3] = 1026502550

[PHP] sort multidimensional array?

2001-03-27 Thread phpman
Hello, i have this code: while ($row = mysql_fetch_array($results)) { $tmp = get_item_reorder_priority($row["item_sku"]); $list[$r]["priority"] = $tmp[0]; $list[$r]["sku"] = $row["item_sku"]; $r++; } $list = array_multisort($list["priority"], SORT_NUMERIC, SORT_DESC);

Re: [PHP] sort multidimensional array?

2001-03-27 Thread Stuart J. Browne
while ($row = mysql_fetch_array($results)) { $tmp = get_item_reorder_priority($row["item_sku"]); $list[$r]["priority"] = $tmp[0]; $list[$r]["sku"] = $row["item_sku"]; $r++; } $list = array_multisort($list["priority"], SORT_NUMERIC, SORT_DESC); and it returns this

Re: [PHP] sort multidimensional array?

2001-03-27 Thread phpman
I'm still confused. I'm looking to sort the list[$r] part of the array based on what value $list[$r]["priority"] is. What would the function's arguments be? ""Stuart J. Browne"" [EMAIL PROTECTED] wrote in message 99rajk$i0v$[EMAIL PROTECTED]">news:99rajk$i0v$[EMAIL PROTECTED]... while ($row =