Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMike Coding
1,883 Pointscan't solve it
it writes:Bummer: There should be multiple arrays within an array. The outermost array should be 0 indexed. Example: $contacts = array(array('name'=>'Alena Holligan'));
1 Answer
jamesjones21
9,260 PointsHi Mike,
it is asking for a multidimensional array with associative names as keys try setting the code like this:
$contacts[] = [
'name' => 'Alena Holligan',
'email' => 'alena.holligan@teamtreehouse.com',
];
$contacts[] = [
'name' => 'Dave McFarland',
'email' => 'dave.mcfarland@teamtreehouse.com',
];
$contacts[] = [
'name' => 'Treasure Porth',
'email' => 'treasure.porth@teamtreehouse.com',
];
$contacts[] = [
'name' => 'Andrew Chalkley',
'email' => 'andrew.chalkley@teamtreehouse.com',
];
so from top the first contacts array will be 0 then last will be 3