PHP Build a Basic PHP Website (2018) Listing and Sorting Inventory Items Associative Arrays

Build a Basic PHP Website challenge error

hi I can't understand what is wrong with my code

index.php
<?php 
$movie[] = [
 "title" => "The Empire Strikes Back"
];
?>

<h1>Back to the Future (1985)</h1>

<table>
  <tr>
    <th>Director</th>
    <td>Robert Zemeckis</td>
  </tr>
  <tr>
    <th>IMDB Rating</th>
    <td>8.5</td>
  </tr>
  <tr>
    <th>IMDB Ranking</th>
    <td>53</td>
  </tr>
</table>

1 Answer

Jeffrey Howard
Jeffrey Howard
15,329 Points

Hi Sindre,

Looks like your first set of brackets that you added to $movie, may be the cause of this task not working. The rest of your code looks correct.

For example below is how you create an empty array named "myArray":

$myArray = [];

Hope this helps. Happy coding!