I have an array which looks like
Array
(
    [0] => Array
        (
            [id] => 39662
            [points] => 24
            [subject] => 112
        )
    [1] => Array
        (
            [id] => 39609
            [points] => 24
            [subject] => 87
        )
    [2] => Array
        (
            [id] => 39610
            [points] => 23
            [subject] => 77
        )
    [3] => Array
        (
            [id] => 39608
            [points] => 23
            [subject] => 87
        )
    [4] => Array
        (
            [id] => 39606
            [points] => 22
            [subject] => 60
        )
    [5] => Array
        (
            [id] => 39604
            [points] => 19
            [subject] => 75
        )
    [6] => Array
        (
            [id] => 39595
            [points] => 18
            [subject] => 60
        )
    [7] => Array
        (
            [id] => 39605
            [points] => 18
            [subject] => 47
        )
    [8] => Array
        (
            [id] => 39650
            [points] => 17
            [subject] => 87
        )
    [9] => Array
        (
            [id] => 39660
            [points] => 17
            [subject] => 55
        )
)
Now I want to sort then based on count of key subject. You can see that subjuet = 87 have 3 records and subject = 60 has two records, so all three records of 87 should display first , after this records of 60 , then others.
I tried array_multisort but its not giving expected result.
Thanks
 
     
     
    