xampp syntax error help needed

Hello, have just started learning php and am coming up with some errors I can’t solve. Any help will be most appreciated.

I am building a test site with 6 pages, a form, and images and text only. It was working fine, but when I edited the menu I got this Parse error in the browser window:
syntax error, unexpected $end in C:\xampp\htdocs\first_point\assets\includes\header.php on line 159

I have searched but had no luck in finding the cause. I have pasted code for lines 154 to the end of the file.

<?php }elseif($page == "ourLocation") {?>
    <div id="subOurLocation">
        <h1>Our Location <span class="keywords">in AWBCP</span></h1>
    </div> <!-- subLocalAttractions CLOSE -->
    <?php }elseif($page == "contact") {?>
    <div id="subContact">
        <h1>Contact <span class="keywords">AWBCP</span></h1>
    </div> <!-- subContact CLOSE -->
    <?php } ?>
	<div id="layContentArea">

Jennie

In these case, the line number means absolutely nothing. The error means you’re missing a } somewhere. The block you posted looks ok to me, so go through the code and make sure each { has a }.

Thanks for that, I was hoping there might be another cause. My checking, so far, show brackets are matching in number and look to be in the correct place. But, I’ll go and have another check.

Thanks again.

Sponsor our Newsletter | Privacy Policy | Terms of Service