0

what's the wrong in this code?

<?
$pages = array();
$pages["New_Student.php"] = "New_Student";
$pages["NewCourse.php"] = "NewCourse";
$pages["Payment.php"] = "Payment";
$pages["Newcontract.php"] = "New contract";
$pages["New_user.php"] = "New User";
$pages["logout.php"] = "Logout";
$activePage = "Admin_dashboard.php";
           foreach($pages as $url=>$title):?>
       <a <?php if($url === $activePage):?>class="current-demo" <?php endif; ?> href="<?php echo $url;?>">
         <?php echo $title;?>
      </a>
<?php endforeach; ?>

Parse error: syntax error, unexpected 'endforeach' (T_ENDFOREACH), expecting end of file

KTS Jordan
  • 13
  • 4

0 Answers0