PHP Sort multi-dimension array by keys

  arrays, php

I have a multi dimension array like below:

Array 
   (
   [1200] => Array 
      (
      [B] => Array
         (
         [4] => Array
             (
             [Name] => 'Joe']
             )
         )
      [A] => Array
         (
         [3] => Array
             (
             [Name] => 'Paul']
             )
         )
      )
   [1100] => Array 
      (
      [F] => Array
         (
         [2] => Array
             (
             [Name] => 'Sam']
             )
         )
      [D] => Array
         (
         [1] => Array
             (
             [Name] => 'Jane']
             )
         )
      )

What I wish to achieve is having the 4 digit number 1100 and 1200 in order ascending, then I need the letters (B A) and (F D) also in order, and then the single digit number under them in order ascending too. I believe I’m looking at a multi dimension array but any help would be appreciated.

Source: Ask PHP

LEAVE A COMMENT