Timma Posted July 24, 2007 Share Posted July 24, 2007 Not sure what the problem could be... Parse error: syntax error, unexpected T_INCLUDE, expecting ',' or ';' in *****\index.php on line 8 <?php $page = basename($_SERVER['QUERY_STRING']); include('includes/header.php'); echo " <table width='1024' border='0' cellspacing='0' cellpadding='0'> <tr> <td width='150'>" include('includes/nav.php'); "</td> <td width='12'> </td> <td width='700'>" if(!$page){ include('pages/main.php'); } else { if(file_exists('pages/'.$page.'.php')){ include('pages/'.$page.'.php'); } else { echo('This page does not exist!'); } } "</td> <td width='162'> </td> </tr> </table> "; include('includes/footer.php'); ?> Link to comment https://forums.phpfreaks.com/topic/61520-solved-echoinclude-problems/ Share on other sites More sharing options...
jitesh Posted July 24, 2007 Share Posted July 24, 2007 echo " <table width='1024' border='0' cellspacing='0' cellpadding='0'> <tr> <td width='150'>"; [semi colon] Link to comment https://forums.phpfreaks.com/topic/61520-solved-echoinclude-problems/#findComment-306203 Share on other sites More sharing options...
OnlyLeif Posted July 24, 2007 Share Posted July 24, 2007 Ehrm.. you need to close your echo statements with ; for example: echo " <table width='1024' border='0' cellspacing='0' cellpadding='0'> <tr> <td width='150'>"; And you have several other places with this error as well. Correct it everywhere. Link to comment https://forums.phpfreaks.com/topic/61520-solved-echoinclude-problems/#findComment-306206 Share on other sites More sharing options...
DeadEvil Posted July 24, 2007 Share Posted July 24, 2007 <?php $page = basename($_SERVER['QUERY_STRING']); include('includes/header.php'); $content = ""; $content .= "<table width='1024' border='0' cellspacing='0' cellpadding='0'><tr><td width='150'>"; $content .= include('includes/nav.php'); $content .= "</td><td width='12'> </td><td width='700'>"; if(!$page){ $content .= include('pages/main.php'); } else { if(file_exists('pages/'.$page.'.php')){ $content .= include('pages/'.$page.'.php'); } else { $content .= echo('This page does not exist!'); } } $content .="</td><td width='162'> </td></tr></table>"; print $content; include('includes/footer.php'); ?> Link to comment https://forums.phpfreaks.com/topic/61520-solved-echoinclude-problems/#findComment-306207 Share on other sites More sharing options...
shivani.shm Posted July 24, 2007 Share Posted July 24, 2007 check this out u can't assign echo to some variable <?php $page = basename($_SERVER['QUERY_STRING']); include('includes/header.php'); $content = ""; $content .= "<table width='1024' border='0' cellspacing='0' cellpadding='0'><tr><td width='150'>"; $content .= include('includes/nav.php'); $content .= "</td><td width='12'> </td><td width='700'>"; if(!$page){ $content .= include('pages/main.php'); } else { if (file_exists('pages/'.$page.'.php')){ $content .= include('pages/'.$page.'.php'); } else { $content .= 'This page does not exist!'; } } $content .="</td><td width='162'> </td></tr></table>"; print $content; include('includes/footer.php'); ?> Link to comment https://forums.phpfreaks.com/topic/61520-solved-echoinclude-problems/#findComment-306228 Share on other sites More sharing options...
Timma Posted July 25, 2007 Author Share Posted July 25, 2007 Thank you all! Link to comment https://forums.phpfreaks.com/topic/61520-solved-echoinclude-problems/#findComment-306956 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.