Stylow Posted May 28, 2014 Share Posted May 28, 2014 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 ] <?phpphpinfo();?><?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><?phpget_footer();?> Quote Link to comment https://forums.phpfreaks.com/topic/288835-parse-error-syntax-error-unexpected-end-of-file/ Share on other sites More sharing options...
cyberRobot Posted May 28, 2014 Share Posted May 28, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/288835-parse-error-syntax-error-unexpected-end-of-file/#findComment-1481151 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.