PHP replace words to links except images

后端 未结 3 1311
后悔当初
后悔当初 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:28

    EDIT: the previsouly suggested correction was not relevant.

    Still:

    • I would suggest you not to use any regex but only str_replace in your case if you have a performance constraint.
    • You must change your MySQL functions that are legacy: http://php.net/manual/en/function.mysql-fetch-array.php

提交回复
热议问题