Link to home
Start Free TrialLog in
Avatar of benwiggy
benwiggyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Sort array

How can I sort the following array so that it is sorted by the first of the two values, in descending order? (i.e. 16, 10, 1)

Array
(
    [0] => stdClass Object
        (
            [name] => undefined
            [values] => Array
                (
                    [0] => 16
                    [1] => 0
                )

        )

    [1] => stdClass Object
        (
            [name] => GBP
            [values] => Array
                (
                    [0] => 1
                    [1] => 0.01
                )

        )

    [2] => stdClass Object
        (
            [name] => EUR
            [values] => Array
                (
                    [0] => 10
                    [1] => 2.37
                )

        )

)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of benwiggy

ASKER

perfect, thank you :)
Glad to help!  Thanks for the points and best of luck with your project, ~Ray