PHP - remove

后端 未结 7 2496
梦如初夏
梦如初夏 2020-11-27 15:15

Hey, I need to delete all images from a string and I just can\'t find the right way to do it.

Here is what I tryed, but it doesn\'t work:

preg_replac         


        
7条回答
  •  臣服心动
    2020-11-27 15:44

    You need to assign the result back to $content as preg_replace does not modify the original string.

    $content = preg_replace("/]+\>/i", "(image) ", $content);
    

提交回复
热议问题