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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.