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 trialTiago Pinheiro
10,622 PointsI'm stuck here
here is my code:
<h1><?php echo $movie["title"]; . (echo $movie["year"]) ;?></h1>
2 Answers
Stone Preston
42,016 Pointsyour echo statement isnt going to work the way you have it. I would suggest trying something like this which doesnt require any concatenation, but uses 2 separate php statements
<h1><?php echo $movie["title"]; ?> (<?php echo $movie["year"]; ?>)</h1>
to get it to work the way you you have it right now, (inside one php statement) you are going to have to concatenate each parenthesis separately like so (be sure to include the space before the first parenthesis):
<h1><?php echo $movie["title"] . " (" . $movie["year"] . ")" ;?></h1>
Tiago Pinheiro
10,622 PointsYou're the fastest and most efficient help around here. Thanx once again for your help.
Stone Preston
42,016 Pointsglad i could help : )