Jump to content

Parse error: syntax error, unexpected end of file.


Stylow

Recommended Posts

Hi i tried to fix something but ended up screwing something up.Ive got a problem and i dont know how to fix it. 
Down here u can see the code. the error im getting is "Parse error: syntax error, unexpected end of file." Could someone please help me?

 

Syntax: [ Download ] [ Hide ] [ Select ] [ Expand ]
<?php
phpinfo();
?>
<?php
/*
Template Name: Home page
*/


get_header();

if(have_posts()){
while(have_posts()){
the_post();
$title=get_the_title();
$pageId=get_the_ID();
$subtitle=get_post_meta($pageId, 'subtitle_value', true);
$slider=get_post_meta($pageId, 'slider_value', true);    

include(TEMPLATEPATH . '/includes/page-header.php');
?>

<div id="content-container" class="center">

    <!--content-->
    <?php 
    the_content(); {
    }
    ?>

    <?php 
    for($i=1; $i<=3; $i++){
        $suf=$i==3?'-3':'';
    }
    ?>
    <div class="services-box three-columns<?php echo $suf; ?>">
        <h4><span><?php echo get_opt('_home_box_title'.$i); ?></span></h4>
        <?php echo get_opt('_home_box_desc'.$i); ?> <br/>
    <img src="<?php echo get_opt('_home_box_icon'.$i); ?>" alt="img" /> <a href="<?php echo get_opt('_home_box_btn_link'.$i); ?>" class="button"><span><?php echo get_opt('_home_box_btn_text'.$i); ?></span></a> </div>

</div>
<?php
get_footer();
?>

 

It looks like you're missing the end curly brackets for your if and while statements. I would imagine that they're supposed to go near the end.

       <?php
    }
}
get_footer();
?>

Also note that there is a set of mystery brackets after the call to the_content().

<?php 
the_content(); {
}
?>

As far as I can tell, these brackets aren't needed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.