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

Associative Arrays Challenge

been over it for about 18hrs I'm stuck some help would be useful ,Randy Hoyt 2 <?php $movie[] = "title" =>"Back to the Future","year" =>"(1985)"); 3 //<?php echo $movie["year"] 4 ? 5 ? 6 ?> 7 ? 8 <h1><?php echo $movie["title"]?> <?php $movie["year"]?>(1985)</h1> 9 '

2 Answers

Hello,

On line 2 you forgot to include the "array(" at the start of the Back to the Future declaration. Add that and see if it makes the challenge pass.

Cheers!

i got nothing I'm stuck on 6 of 7 adding the new date of ' ["year"] => "1980" ' to the following

' <h1><?php echo $movie["title"]?> (1985)</h1> '

would normally read ' <h1><?php echo $movie["title"];$movie["year"]?> (1980)</h1>' = "The Empire Strikes Back", "1980" but the chose isn't working. The Preview isn't working either, not able to dump or check the array for errors in method.

im stuck like brain exploding.

this is now day 2.

thx anyway @Shawn

'<?php $movie = array(); $movie["title"] = "The Empire Strikes Back"; $movie["year"]="1980"; $movie["director"]= "Irvin Kershner"; $movie["imdb_rating"]=""; $movie["imdb_ranking"]=""; ?> '

ok so it follows as this ' <h1><?php echo $movie["title"]?><?php echo $movie["year"]?></h1> ' which stands as correct!

I hope this helps thanks bunch Randy Hoyt!