Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP:无法将字符串值分配给变量 if($page\u name==“top\u sites”){ $page_text=“”; }_Php_String - Fatal编程技术网

PHP:无法将字符串值分配给变量 if($page\u name==“top\u sites”){ $page_text=“”; }

PHP:无法将字符串值分配给变量 if($page\u name==“top\u sites”){ $page_text=“”; },php,string,Php,String,这个代码不起作用 请帮我更正它您需要退出您的“ 因此,只需在它们前面放一个\: if($page_name == "top_sites"){ $page_text = "<a href="http://www.mysite.com/top-site">Top 200</a>"; } $page_text=”“; 或者,可以在字符串周围使用单引号: $page_text = "<a href=\"http://www.mysite.com/top-site\"&

这个代码不起作用
请帮我更正它

您需要退出您的

因此,只需在它们前面放一个
\

if($page_name == "top_sites"){

$page_text = "<a href="http://www.mysite.com/top-site">Top 200</a>";
}
$page_text=”“;
或者,可以在字符串周围使用单引号:

$page_text = "<a href=\"http://www.mysite.com/top-site\">Top 200</a>";
$page\u text='';

您需要退出您的

因此,只需在它们前面放一个
\

if($page_name == "top_sites"){

$page_text = "<a href="http://www.mysite.com/top-site">Top 200</a>";
}
$page_text=”“;
或者,可以在字符串周围使用单引号:

$page_text = "<a href=\"http://www.mysite.com/top-site\">Top 200</a>";
$page\u text='';
if($page\u name==“热门站点”){
$page_text='';
}
if($page\u name==“热门站点”){
$page_text='';
}

为什么使用mysql标签?这个问题与mysql无关!为什么是mysql标签?这个问题与mysql无关$标题_text=“//”/“/”$标题2。“壁纸”$标题_text=“”@哈桑:请让我知道我的答案有哪些错误?@Hassan-$header_text=“”;或$header_text='';了解如何在字符串中转义引号,这样您就不必在每次需要转义引号时都寻求帮助。此线程似乎正在走向死胡同。$header_text=“/”/“/”$标题2。“壁纸”$标题_text=“”@哈桑:请让我知道我的答案有哪些错误?@Hassan-$header_text=“”;或$header_text='';了解如何在字符串中转义引号,这样您就不必在每次需要转义时都寻求帮助。此线程似乎正在走向死胡同。$header_title=“”;如何修复此问题?您只需关闭字符串,然后再将其与另一个字符串连接:“抱歉,忘记转义href.$header\u title=”“中的引号”;如何修复此问题?您只需关闭字符串,然后再将其与另一个字符串连接:“对不起,忘记转义href中的引号了。”。