Jump to content

[SOLVED] Parse Error - fresh eyes please


soycharliente

Recommended Posts

Can I get a fresh pair of eyes on this to resolve the error? Or some help at what I can do figure out what's wrong? I'm tired of looking at it. I'm taking code that I've already written and pasting into a new layout. I don't know why all the sudden it's not working. I already tested the query inside phpMyAdmin and all the data is coming through properly. Please help! (where is the smiley that pulls it's hair out?)

 

Parse error: parse error, unexpected '}', expecting ',' or ';'

 

<?php
dbconnect();
$query = "SELECT * FROM donger ORDER BY thedate DESC LIMIT 8";
$result = mysql_query($query) or DIE("Error: ".mysql_error());
if (mysql_num_rows($result) > 0) {
while ($r = mysql_fetch_array($result)) {
	$id = $r["id"];
	$place = $r["loc"];
	$ymd = explode("-", $r["thedate"]);
	$thedate = date("d F Y", mktime(0, 0, 0, $ymd[1], $ymd[2], $ymd[0]));
	$rating = (empty($r["satisfaction"])) ? "N/A" : $r["satisfaction"];
	echo "<a href=/"#/" title=/"View all lunches for $place/"><span>$rating</span>$place<br/>-<br/>$thedate</a>";
} // ERROR ON THIS LINE
}
dbclose();
?>

Link to comment
https://forums.phpfreaks.com/topic/91335-solved-parse-error-fresh-eyes-please/
Share on other sites

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.