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 trialAmitkumar Patel
6,699 PointsAdd an element to the $movie array with a key of "year" and a value of 1980.
<?php $movie=array( ); $movie["title"] = "The Empire Strikes Back"; $movie["year"] = 1980; ?>
<?php $movie = array( "title" => "The Empire Strikes Back" "year"=> 1980); ?>
<h1><?php echo $movie["title"]; ?> (1985)</h1>
I'm not sure what I'm doing wrong!
1 Answer
Aurelian Spodarec
10,801 PointsYou'r first line looks like
<?php $movie=array( ); $movie["title"] = "The Empire Strikes Back"; $movie["year"] = 1980; ?>
It;s out of the array. Read the line , move=array(), you should close the last ) at the end i suppose.
I don't do PHP, but that's the first thing i noticed.
And i think you should have one array. If what above wroks that i give, then i understand it i suppose, if not re-watch the video.
Amitkumar Patel
6,699 PointsAmitkumar Patel
6,699 PointsThank you very much!