I used json_decode()
to decode a JSON file into $data
. So I think now I have an array of arrays:
$data:
1 first= "bob", last= "smith", middle= "t", ID= "123"
2 first= "paul", last= "adams", middle= "d", ID= "38"
3 first= "jon", last= "williams", middle= "g", ID= "132"
I want to sort $data
by last. I think I need to use usort()
but can't get it to work.