Jump to content

[SOLVED] Parse syntax error


loony383

Recommended Posts

I haven't done any php in a while and cant fix this annoying error

 

Parse error: syntax error, unexpected ';', expecting T_WHILE in /home/******/public_html/index.php on line 65

 

 <?php
			  if ($page = index) {
			  include ("forumposts.php");
				} else do {
				if ($page = donate) {
				include ("donate.php");
				} else do {
				if ($page = team) {
				include ("team.php");					
				} else do {
				if ($page = download) {
				include ("downloads.php");
				} else do {
				include ("news.php");
				}						
?>

Link to comment
https://forums.phpfreaks.com/topic/108723-solved-parse-syntax-error/
Share on other sites

How about

 

<?php

if ($page = index) {
			  include ("forumposts.php");
				} elseif ($page = donate) {
				include ("donate.php");
				} elseif ($page = team) {
				include ("team.php");					
				} elseif ($page = download) {
				include ("downloads.php");
				} else {
				include ("news.php");
				}						


?>

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.