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 trialRobbie Bray
2,286 PointsMultidimensional Task 3 of 3
Ok, so task 3 asks: "Replace the hard coded values in the output with the name and email values from the contacts array." But no matter what I try I get the reply "Bummer! I do not see the required output. You should not be modifying the output at this point." It's asking me to modify the output, then telling me I should not be modifing the output at this point? As a beginner with PHP I've come to realise that understanding the question is half the battle in these tasks, maybe I just don't understand what is being asked for here. Does anyone have any pointers?
2 Answers
Fletcher Henneman
3,130 PointsOne issue I had was that I spelled one of the instructors names wrong, but the code was correct. I received the same issue you do.
Also, this question does not accept answers that use for(each) loops. You want to edit each li
and have your code print out the corresponding name and email in the same format.
<li>Name : Email</li>\n
I posted the correct array at the link below if you need it. Pastebin Link
James Ackerman
14,099 PointsWow, what a P.I.A. Thanks for posting the answer. I've spent over an hour on this challenge, have 4 tabs open in addition to Treehouse, and I'm still not quite sure why that answer works even after having watched the previous videos twice.
FFS, I wish people would explain things more clearly in the videos and were more clear about what is being asked in the code challenges.
Robbie Bray
2,286 PointsRobbie Bray
2,286 PointsHi Fletcher, I actually completed and passed the task. I think the problem I was having was caused by not placing a space on either side of the ":" (This was required " : "). I think it would be a good idea for Treehouse to show the answer if you don't manage to complete a task after a so many attempts, maybe a 'Show Answer' link or something. And then you would be required to go back and redo the 3 tasks. For example, I completed the tasks and can move on, but looking at your code and the arrays within an array I realise that you did it in a different way to me, I think you did it the 'correct' way, and now the array within array is firmly in my head! So thanks a lot for replying with this as it has helped me learn more. I suppose if we were in a physical classroom, this is the sort of thing that would be discussed in minutes on tea/coffee breaks. Thanks again for your reply, you've been a big help...! P.S. I haven't got to fore(each) loops yet, so I didn't try it that way!