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 trialshane hilton
Courses Plus Student 11,589 PointsPHP Development challenge 5 of 7
stuck on this code challenge cannot get it to work i have read the other forums but no help am i missing something here is my code from the challenge
<?php $movie = array( "title" => "The Empire Strikes Back", "year" => "1980" ); ?>
<h1><?php echo $movie["title"]; ?>(<?php echo $movie["year"]; ?>)</h1>
3 Answers
Stephen Smith
Courses Plus Student 27,878 PointsI think it may just be that there is no space between the movie title php statement and the first parenthesis. <?php echo $movie["title"]; ?>[space needed here](<?php echo $movie["year"]; ?>)
Jeff Busch
19,287 PointsHi Shane,
Two things, one is the h1 tags are missing, maybe you just didn't type them, and two is you need a space between ?> and (. In the real world the code will work without the space but you wont have a space between Back and (1980). I guess the code challenge doesn't like that. Also, while I have your attention I'd like to offer the following:
If you look to the bottom right of the text box you will see something that says Markdown Cheetsheet. Also, there is a post here titled: Posting Code to the Forum by Dave McFarland. If you don't understand that maybe this will make sense: How to display code at Treehouse.
Jeff
shane hilton
Courses Plus Student 11,589 Pointsthanks heaps for some reason when i copy and pasted the code the h1 tags disappeared that space worked for me spent over an hour trying to work it out cannot be leave it was as simple as the space
thanks heaps