I get this message when I click on the article page on my site: http://www.digitalcamera101.info/articles.php Parse error: syntax error, unexpected T_STRING in /home/besto18/public_html/digitalcamera101/articles.php on line 197 Here are lines 192 thur 203: if (isset($rss_channel["ITEMS"])) { if (count($rss_channel["ITEMS"]) > 0) { for($i = 0;$i < count($rss_channel["ITEMS"]);$i++) { if (isset($rss_channel["ITEMS"][$i]["LINK"])) { echo ("\n<div class="itemtitle"><a target=_blank href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" . $rss_channel["ITEMS"][$i]["LINK"] . "">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>"); } else { <--------------------------------------------------------Line 197 echo ("\n<div class=/"itemtitle/">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>"); } echo ("<div class=/"itemdescription"/>" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />"); } } else { echo ("No News Found"); }
in the line above 197, you have echo ("stuff here"); where i have the "stuff herE", you have content with " 's in it, you need to change them to ' 's
Think he was referring to the addslashes function. Dunno. But to answer your question... if you use " as the delimiter, it has to be escaped... $string = "this is a quote \" quote \" and that's ok"; same goes for if you used ' as the delimiter... $string = 'this is a quote "quote" but the quotation\'s fine'; So why don't we just use the 's? Variables. if you put $variable = "red"; $string = "text $variable text"; would print text red text Alls fine. If you use '. $string = 'text $variable text'; would print text $variable text HTH
the slash shd be like this \ not like this / echo ("\n<div class=\"itemtitle\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>"); similarly replace this echo ("\n<div class="itemtitle"><a target=_blank href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" . $rss_channel["ITEMS"][$i]["LINK"] . "">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>"); with echo ("\n<div class=\"itemtitle\"><a target=_blank href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href=\"\" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" . $rss_channel["ITEMS"][$i]["LINK"] . "">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>");