How to remove a link from content in php?

前端 未结 7 850
悲哀的现实
悲哀的现实 2020-12-24 09:12

How can i remove the link and remain with the text?

text text text. 
7条回答
  •  抹茶落季
    2020-12-24 10:09

    Try this one. Very simple!

    $content = "text text text. 
    name"; echo preg_replace("/]+\>[a-z]+/i", "", $content);

    Output:

    text text text. 

提交回复
热议问题