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

PHP Build a Simple PHP Application Listing Inventory Items Associative Arrays

Do I use concatenation to display the year or is it wanting me to create another value ??

Do I use concatenation to display the year or is it wanting me to create another value ?? Bit Puzzled here tried a few different options not quite getting it right and the preview is not currently working :S

1 Answer

Aaron Graham
Aaron Graham
18,033 Points

You can concatenate it. Be sure and leave the space before the first parenthesis on the year. This worked for me:

<h1><?php echo $movie['title'] . ' (' . $movie['year'] . ')'; ?></h1>

Hi Aaron,

Thanks a lot! Got me through, I thought this was the best way to do it but was making a couple of errors along the way i.e. spaces before and after the spaces.

Thanks Again Craig