0

I'm new to PHP and I would like some help here in sorting the following output in descending order according to PersonalScore. I tried using usort function but it throws me "Trying to get a property of non-object.

    Array
(
    [0] => Array
        (
            [personalityTitle] => adaptation
            [personalityScore] => 45.26983535746609
            [personalityInfo] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 31
                            [page_type] => 8
                            [cms_title] => adaptation
                            [alias_title] => adaptation
                            [sub_title] => 
                            [short_desc] => 
                            [long_desc] => People with high adaption ability can adjust to changes in the work place while maintaining a positive demeanor.
                            [cms_img] => 
                            [status] => 1
                            [created_date] => 2019-07-04 08:11:47
                            [updated_date] => 
                        )

                )

        )

    [1] => Array
        (
            [personalityTitle] => communication
            [personalityScore] => 30.311746831472565
            [personalityInfo] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 26
                            [page_type] => 8
                            [cms_title] => communication
                            [alias_title] => communication
                            [sub_title] => 
                            [short_desc] => 
                            [long_desc] => 

Appreciate all your help.

Thanks !

Shiva

Shiva
  • 11
  • 1
  • 3

0 Answers0