if($page_name == "top_sites"){
$page_text = "<a href="http://www.mysite.com/top-site">Top 200</a>";
}
此代碼不能正常工作 請幫我糾正PHP:不能字符串值賦給變量
if($page_name == "top_sites"){
$page_text = "<a href="http://www.mysite.com/top-site">Top 200</a>";
}
此代碼不能正常工作 請幫我糾正PHP:不能字符串值賦給變量
你需要逃避你"
所以只是把\
在他們面前:
$page_text = "<a href=\"http://www.mysite.com/top-site\">Top 200</a>";
或者,您可以在字符串周圍使用單引號:
$page_text = '<a href="http://www.mysite.com/top-site">Top 200</a>';
$ header_title =「. $category .」; 如何解決這個問題? – Hassan 2011-03-29 09:40:15
您只需要在將它與另一個連接起來之前關閉該字符串:「".$category."」 – 2011-03-29 10:29:51
對不起,忘記在您的href中轉義引號。 – 2011-03-29 10:30:41
if($page_name == "top_sites"){
$page_text = '<a href="http://www.mysite.com/top-site">Top 200</a>';
}
$ header_text =「//」. $category .「//」。 $標題2。 「壁紙」; – Hassan 2011-03-29 09:37:56
如何解決這個 – Hassan 2011-03-29 09:39:00
$ header_text =「. $category .」; – Hassan 2011-03-29 09:39:26
爲什麼使用mysql標籤?這個問題與mysql無關! – 2011-03-29 09:35:36