Reorder a multidimensional array?

Posted by JasonS on Stack Overflow See other posts from Stack Overflow or by JasonS
Published on 2010-03-22T08:42:13Z Indexed on 2010/03/22 8:51 UTC
Read the original article Hit count: 360

Filed under:
|
|

I have the following array, I need to reorder it by average rating descending. Here is a snippet. Any idea how I would go about doing this?

Thanks

Array
(
    [0] => Array
        (
            [id] => 3
            [name] => 
            [rating] => 0
        )

    [1] => Array
        (
            [id] => 2
            [name] => 
            [rating] => 2
        )
)

© Stack Overflow or respective owner

Related posts about php

Related posts about array