preg_replace, str_replace and substr_replace not working in special condition

六眼飞鱼酱① 提交于 2019-12-02 03:06:38

preg_replace does not substitute $str. Assign it to the string again:

$str = preg_replace($temp, "[[".$count."]]", $str);

Also, I'm not sure what you want exactly, but this I changed some things in the code, which seems to be what you were tying to do. I changed the regex a bit, especially the (.*?) part to ([^<>]+).

the problem may be in this line

foreach($out[0] as $result) {

change it to this

foreach($out as $result) {

because i think you are accessing an index that doesn't exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!