PHP replace words to links except images

后端 未结 3 1248
后悔当初
后悔当初 2021-01-25 23:48

My code is

$words = array();
$links = array();
$result = mysql_query(\"SELECT `keyword`, `link` FROM `articles` where `link`!=\'\".$act.\"\' \") 
or die(mysql_er         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-26 00:37

    EDIT: I can't believe it took me that long to understand that you're trying to parse big chunks of HTML with regular expressions. Read the answer to this question: RegEx match open tags except XHTML self-contained tags

提交回复
热议问题