PHP printing from multidimensional array

Soldato
Joined
27 Dec 2005
Posts
17,288
Location
Bristol
I'm sure the answer here is really simple but I just don't know what to search for. I've got a multidimensional array (opened from a Google Sheet) that looks something like this:

Code:
Array
(
    [0] => Array
        (
            [0] => Name
            [1] => Company
        )

    [1] => Array
        (
            [0] => Joe Bloggs
            [1] => Overclockers UK
        )

    [2] => Array
        (
            [0] => Joanna Blug
            [1] => CaseKing
        )
)


I've searched the array for "Joe Bloggs" with $key = array_search($name, array_column($sheet, 0)). How do I then print what company they work for based on $key?
 
Back
Top Bottom