Mod-Jay Posted September 3, 2010 Share Posted September 3, 2010 Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Users\cory\Desktop\xampp\htdocs\Starter Kit(2)\inc\slider.php on line 13 Code used: <?php $rr = mysql_query("SELECT * FROM news"); while($r = mysql_fetch_array($rr)) { $name1=$r["name"]; $desr=$r["desr"]; $link1=$r["link"]; $date1=$r["date"]; $datem1=$r["datem"]; } echo " <div class="cs_article"> <div class="left"> <h2>$name1</h2> <p>$desr</p> <div class="button"><a href="$link1">Read more</a></div> </div> <div class="right"> <h1>$name1</h1>" </div> </div> "; ?> Line 19 is: <div class="cs_article"> Help me please.. Im trying to actully get it to do that for every topnews i have.. Link to comment https://forums.phpfreaks.com/topic/212437-error/ Share on other sites More sharing options...
wildteen88 Posted September 3, 2010 Share Posted September 3, 2010 You need to escape the double quotes within your string, eg <div class=\"cs_article\">. Or start your string with single quotes. Link to comment https://forums.phpfreaks.com/topic/212437-error/#findComment-1106806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.