I need to print this full multidimensional array in a table and sort it by name [A-Z].
//Example not sorted:
//Id - Name - Last name -      Email        - Phone number
   2 - Bldo -  Surname  - email@example.com - 23452524352
   6 - Cldo -  Surname  - email@example.com - 23452524352
   3 - Aldo -  Surname  - email@example.com - 23452524352
//Example sorted:
//Id - Name - Last name -       Email       - Phone Number
   3 - Aldo -  Surname  - email@example.com - 23452524352
   2 - Bldo -  Surname  - email@example.com - 23452524352
   6 - Cldo -  Surname  - email@example.com - 23452524352
Here is the array.
// Array with the contacts details
$contacts = array (
    [0] => Array ( 
        [0] => 2
        [1] => "Bldo" 
        [2] => "Surname" 
        [3] => "email@example.com"
        [4] => 3243125152 
    )
    [1] => Array ( 
        [0] => 6
        [1] => "Cldo" 
        [2] => "Surname" 
        [3] => "email@example.com"
        [4] => 3243125152 
    ) 
    [2] => Array ( 
        [0] => 3
        [1] => "Aldo" 
        [2] => "Surname" 
        [3] => "email@example.com"
        [4] => 3243125152 
    ) 
);
Here is the html.
<?php
    <!-- Resoults from db -->
    <table> 
        <thead>
            <tr>
                <th>Checkbox</th>
                <th>First name</th>
                <th>Last name</th>
                <th>Email</th>
                <th>Phone number</th>
                <th>Update</th>
            </tr>
        </thead>
        <tbody>
            <?php
            // Print contacts here
            ?>
        </tbody>
    </table>
?>
I tried only with one array and it works, but I can't figure it out how to make it with the multidimensional array.
 
     
     
     
    