Forum Moderators: coopster

Message Too Old, No Replies

array sort by value

         

danbhala

1:35 pm on Jun 22, 2007 (gmt 0)

10+ Year Member



i have an array that has the following structure:


Array
(
[0] => xml_make Object
(
[name] => Alfa Romeo
[totalItems] => 270
)

[1] => xml_make Object
(
[name] => Aston Martin
[totalItems] => 7
)

[2] => xml_make Object
(
[name] => Audi
[totalItems] => 948
)

[3] => xml_make Object
(
[name] => Austin
[totalItems] => 51
)

[4] => xml_make Object
(
[name] => BMW
[totalItems] => 2235
)
}

how can I sort the array by the value in totalItems?

joelgreen

5:04 pm on Jun 22, 2007 (gmt 0)

10+ Year Member



Use this function for sorting
[ua2.php.net...]