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 trialabdi ali
434 Pointswhat is wrong with my code any one to help me to solve this problem
p
<?php
$movie = array();
$movie["title"] = "The Empire Strikes Back";
?>
<h1><?php echo $movie["title"]; ?> (1985) </h1>
<table>
<tr>
<th>Director</th>
<td>Robert Zemeckis</td>
</tr>
<tr>
<th>IMDB Rating</th>
<td>8.5</td>
</tr>
<tr>
<th>IMDB Ranking</th>
<td>53</td>
</tr>
</table>
5 Answers
Hugo Paz
15,622 PointsHi Abdi,
You have an extra space after the year.
<h1><?php echo $movie["title"]; ?> (1985)</h1>
abdi ali
434 Pointsoh thanks i got it
Shawn Flanigan
Courses Plus Student 15,815 PointsIt looks like you're stuck on step 3, is that correct? If so, the only potential problem I see is a space after the year, before the closing h1
tag.
Does that help?
Shawn Flanigan
Courses Plus Student 15,815 Points5 minutes too late. Way to go, Hugo!
abdi ali
434 Pointsit is ignoring a space between semicolon and the closing php tag
abdi ali
434 Pointsdon't know why any one knows the explanation
Shawn Flanigan
Courses Plus Student 15,815 PointsThe space in the php is never rendered to the browser, so it doesn't really matter. You can do stuff like this with php and you'll still pass as long as nothing is being output:
<h1><?php echo $movie["title"]; /* This comment is just a bunch of garbage. */ $favoriteNumber = 7; ?> (1985)</h1>