-2

When I run this code, it always shows: Parse error: syntax error, unexpected end of file in /opt/lampp/htdocs/japan_top10_09112018/index.php on line 30

    <?php 
     echo "<title>Top 10 Things to Do in Japan</title>";
     require_once('templates/header.php'); 
   ?>
   <?php
      // Ask teacher: does this code is right to show errors or necessary?
       ini_set('display_errors', 1);
     error_reporting(E_ALL | E_STRICT);
   ?>
  <?php 
     require_once('database/data.php');
  ?>

<div class = "container">
   <h1>Top 10 things to do in Japan</h1>

<?php

foreach($data as $info) {
  print_r($info["Picture"]);
  echo "<hr>";
  // echo '<img src="$info["Picture"]" class="img-thumbnail">';


 ?>

<?php 
require_once('templates/footer.php'); 
?>

The line 30 is the last line.

Yangyang Cui
  • 1
  • 1
  • 5
  • Can you please add the file /opt/lampp/htdocs/japan_top10_09112018/index.php to your question? – FedeCaceres Sep 11 '18 at 18:14
  • Welcome to StackOverflow! Please add some code to your question. You can edit your question using the `edit` link near the end of your question – Brett Gregson Sep 11 '18 at 18:14

1 Answers1

-1

You are forgetting to add a } to close your foreach

FedeCaceres
  • 158
  • 1
  • 11