这是我的代码:的preg_replace没有忽视[]从字符串
$string = "Hello this is my text [readmore] and this is remaining text";
echo preg_replace("[readmore]","",$string);
这是我预期输出:
Hello this is my text and this is remaining text
这是我实际输出:
Hello this is my text [] and this is remaining text
问题很简单如何获得乘坐“[]”也是?
使用'str_replace'函数,检查我的答案。它会工作 – 2013-04-20 08:22:12