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 trialdaniel steinberg
14,651 PointsQuestion on Challenge 1 of 3, multi dim. arrays.
The directions say .."The first step is to make each person their own single item ASSOCIATIVE array, using 'name' as the key for these internal arrays..."
Here is what I did:
$Alena = array('Alena Holligan'=>'alena.holligan@teamtreehouse.com');
$Dave = array('Dave McFarland'=>'dave.mcfarland@teamtreehouse.com');
$Treasure = array('Treasure Porth'=>'treasure.porth@teamtreehouse.com');
$Andrew = array('Andrew Chalkley'=>'andrew.chalkley@teamtreehouse.com');
result: Bummer! Each person in the contact list should have their own internal array. Use another "array()" for each person.
1 Answer
Joe Schultz
6,191 PointsThis is what is required:
$contacts = array(
array('name'=>'Alena Holligan'),
array('name'=>'Dave McFarland'),
array('name'=>'Treasure Porth'),
array('name'=>'Andrew Chalkley'));
You will add the email addresses in the second task.