I'm trying to write a blog and this comes up
:
Parse error: syntax error, unexpected '<' in C:\wamp\www\Blog\index.php on line 65
the code:

$query  = "SELECT id, header, body, views FROM information";
$result = mysql_query($query);
while($row = mysql_fetch_row($result))
{
	print "<div class=section odd>";
	print "<a href=images/riverside.jpg><img src=images/riverside.jpg /></a>"; <!--  width="125" height="60" width=90 height=73" -->
	print "<div>";
	print "<h3>TITLE</h3>";
	print "<p>BODY</p>";
	print "<div class='stats'>";
	print "<a href="#" class="time">Sept 21  by Nullam</a>";
	print "<span>000 views</span>";
	print "<a href="#" class="comments">30</a>";
	print "<a href="http://twitter.com/fwtemplates" class="twitter">Tweet</a>";
	print "<a href="http://facebook.com/freewebsitetemplates" class="facebook">Share</a>";
	print "</div>";
	print "</div>";
        print "</div>";
					
}

Recommended Answers

All 2 Replies

LINE 65 is : print "<div class='stats'>";

Comments in PHP are the following:

# single line comment

// single line comment

/* multi-line
   comment */
<!-- this is a HTML comment and not valid for use within PHP tags as on line 7 of your example -->
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.