使用它时我不断收到错误,我不知道为什么。任何帮助都会很棒。我已经用谷歌搜索并找到了示例,但即使使用其他人的示例,我也会遇到错误。
$statement = $list[$i];
echo $statement;
preg_match("/$statement/i", $q)
我也试过这个,但都不起作用:
$statement = '/' . $list[$i] . '/i';
echo $statement;
preg_match($statement, $q)
我得到的错误是:
警告:preg_match() [function.preg-match]:编译失败:在偏移量 0 处没有可重复的内容
当我回显时,$statement
我得到:("/Who/i"
不带引号)