Annonymous Functions

Script 1.5 - sort_1_5.php

Array Sorted by Name

Array
(
    [50] => Array
        (
            [name] => David
            [grade] => 100
        )

    [256] => Array
        (
            [name] => Jon
            [grade] => 98.5
        )

    [68] => Array
        (
            [name] => Rob
            [grade] => 74.6
        )

    [125] => Array
        (
            [name] => Samantha
            [grade] => 99
        )

    [9] => Array
        (
            [name] => Stephen
            [grade] => 94
        )

    [364] => Array
        (
            [name] => Steve
            [grade] => 85.1
        )

    [2] => Array
        (
            [name] => Vance
            [grade] => 85.1
        )

)
 

Array Sorted by Grade

Array
(
    [50] => Array
        (
            [name] => David
            [grade] => 100
        )

    [125] => Array
        (
            [name] => Samantha
            [grade] => 99
        )

    [256] => Array
        (
            [name] => Jon
            [grade] => 98.5
        )

    [9] => Array
        (
            [name] => Stephen
            [grade] => 94
        )

    [2] => Array
        (
            [name] => Vance
            [grade] => 85.1
        )

    [364] => Array
        (
            [name] => Steve
            [grade] => 85.1
        )

    [68] => Array
        (
            [name] => Rob
            [grade] => 74.6
        )

)