这是我的代码:
$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
问题也很简单,如何获得“[]”?