I have been writing a CMS script and Im now debugging the whole thing and I have come accross an error I have never seen before or understand. The error is as follows

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\vhosts\squarehybrid.com\content.php on line 61

The lines are all in a custom function (the line is marked)

function ShowContent($section, $page='') {
     $section = URItoTitle($section);
     $page = URItoTitle($page);

     if($page != 'index' && $page) $result = mysql_query("SELECT c.cid, c.title, c.page, c.eval, c.bbcode, c.smiley, c.postdate, c.editdate, s.sid, s.sname, s.navigation, u.userid, u.username, u.email FROM content c LEFT JOIN section s USING(sid) LEFT JOIN users u USING(userid) WHERE c.title = '".$page."' AND s.sname = '".$section."'") or die(mysql_error());
     else $result = mysql_query("SELECT c.cid, c.title, c.page, c.eval, c.bbcode, c.smiley, c.postdate, c.editdate, s.sid, s.sname, s.navigation, u.userid, u.username, u.email FROM section s LEFT JOIN content c ON(c.cid = s.default) LEFT JOIN users u USING(userid) WHERE s.sname = '".$section."'") or die(mysql_error());
     list($cnt['id'],$cnt['title'],$cnt['page'],$cnt['eval'],$cnt['bbcode'],$cnt['smiley'],$cnt['date'],$cnt['update'],$sec['id'],$sec['title'],$sec['navigation'],$user['id'],$user['name'],$user['email']) = mysql_fetch_row($result);

     if($cnt['eval']) $cnt['page'] = evalPage($cnt['page']);
     if($cnt['bbcode']) $cnt['page'] = $bbcode->parse_codes($cnt['page']);
     if($cnt['smiley']) $cnt['page'] = $bbcode->parse_smileys($cnt['page']);

     if($cnt['update']) $modified = $cnt['update']; else $modified = $cnt['date'];

     $GLOBALS['title'] = $cnt['title'].' - '.$sec['title'].' - '.$GLOBALS['title'];
     $GLOBALS['mainHeader'] = "<meta name=\"author\" content=\"${user['name']}\" />";
     return $cnt['page'];
 }

I hate no being able to edit my posts, its so annoying.

function ShowContent($section, $page='') { // Line 55
	$section = URItoTitle($section);
	$page = URItoTitle($page);

	if($page != 'index' && $page) $result = mysql_query("SELECT c.cid, c.title, c.page, c.eval, c.bbcode, c.smiley, c.postdate, c.editdate, s.sid, s.sname, s.navigation, u.userid, u.username, u.email FROM content c LEFT JOIN section s USING(sid) LEFT JOIN users u USING(userid) WHERE c.title = '".$page."' AND s.sname = '".$section."'") or die(mysql_error());
	else $result = mysql_query("SELECT c.cid, c.title, c.page, c.eval, c.bbcode, c.smiley, c.postdate, c.editdate, s.sid, s.sname, s.navigation, u.userid, u.username, u.email FROM section s LEFT JOIN content c ON(c.cid = s.default) LEFT JOIN users u USING(userid) WHERE s.sname = '".$section."'") or die(mysql_error());
	list($cnt['id'],$cnt['title'],$cnt['page'],$cnt['eval'],$cnt['bbcode'],$cnt['smiley'],$cnt['date'],$cnt['update'],$sec['id'],$sec['title'],$sec['navigation'],$user['id'],$user['name'],$user['email']) = mysql_fetch_row($result); // Line 61

	if($cnt['eval']) $cnt['page'] = evalPage($cnt['page']);
	if($cnt['bbcode']) $cnt['page'] = $bbcode->parse_codes($cnt['page']);
	if($cnt['smiley']) $cnt['page'] = $bbcode->parse_smileys($cnt['page']);

	if($cnt['update']) $modified = $cnt['update']; else $modified = $cnt['date'];

	$GLOBALS['title'] = $cnt['title'].' - '.$sec['title'].' - '.$GLOBALS['title'];
	$GLOBALS['mainHeader'] = "<meta name=\"author\" content=\"${user['name']}\" />";
	return $cnt['page'];
} // Line 72
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.