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 trial
Antony Wright
6,525 PointsPHP. (4) Code Challenge: Associative Arrays
I cant figure out where my code is wrong. I get the error "Bummer! It looks like the title of the second movie is in the <h1>, but something else isn't quite right. Double-check the parentheses and the year."
my code is below; <?php $movie = array( "title" => "The Empire Strikes Back" ); ?> <h1> <?php echo $movie["title"]; ?> (1985)</h1>
Cant move on and unsure why the code wont work??
1 Answer
Randy Hoyt
Treehouse Guest TeacherI think it's because you a space between the opening <h1> tag and the title. Try removing that, and I think it will work.
It's completely fine that you have a space there in real life. This code challenge is just too strict. I apologize for the trouble: I'll get that fixed soon!