对于你们中的许多人来说,这一定很简单。在php字符串中包含一个php变量
<?php if (stripos($_SERVER['REQUEST_URI'],'/thispage/') !== false) {echo 'This page content';} ?>
但我想insted的“thispage”有这个“$ thisproduct ['别名']”如何做到这一点?
我尝试添加像这样:
<?php if (stripos($_SERVER['REQUEST_URI'],'/$thisproduct['alias']/') !== false) {echo 'This page content';} ?>
,但它给这个错误:解析错误:语法错误,意想不到的T_STRING