Let's say I have this code:
$games = [
"Boys" => ["Danny", "Ben"],
"Girls" => ["Ashley", "Sandra"]
];
And for example, I want to access Danny's name. I can access it by using
$games["Boys"][0]
But what if I want to access it by it's bit index (for future foreach
loops)? I tried something like:
$games[0][0]
But I get an error (unindexed something).