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
brock lynch
6,956 PointsHow do I do 3 of 7 Associative Array Under Listing Inventory Items?
I have this...
<?php
$movie = array();
$movie["title"] = "The Empire Strikes Back";
?>
<h1><?php $movie["title"]; ?> (1985)</h1>
I'm pretty sure I have it the right way but when I type it in it tells me the following:
Bummer! The title of the second movie is not displayed in the <h1>.
2 Answers
Hugo Paz
15,622 PointsHi Brock,
You forgot the echo statement:
<?php
$movie = array();
$movie["title"] = "The Empire Strikes Back";
?>
<h1><?php echo $movie["title"]; ?> (1985)</h1>
brock lynch
6,956 PointsThanks