soycharliente Posted February 15, 2008 Share Posted February 15, 2008 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(); ?> Quote Link to comment Share on other sites More sharing options...
nogray Posted February 15, 2008 Share Posted February 15, 2008 /" should be \" in the echo line Quote Link to comment Share on other sites More sharing options...
soycharliente Posted February 15, 2008 Author Share Posted February 15, 2008 I feel like I should lose points in life for not noticing that. It didn't even dawn on me that the 1 thing I changed could be the error. THANK YOU SO MUCH. Where is solved link? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.