Page 1 of 1

Parse error: syntax error, unexpected end of file.

Posted: Wed May 28, 2014 6:39 am
by stylow
[text]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? [/text]

Code: Select all

<?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();
?>

Re: Parse error: syntax error, unexpected end of file.

Posted: Wed May 28, 2014 6:48 am
by Celauran
You open an if, then a while, and never close either of them. Also, this:

Code: Select all

    the_content(); {
    }