PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > 开发编程 > PHP教程 > 正文

    用str_ireplace()函数对查询关键字实现描红功能

    作者:admin来源:原创浏览:时间:2020-09-30 00:07:50我要评论
    导读:用do....while循环语句输出付费信息与查询关键字相匹配的信息资源,并用str_ireplace()函数对查询关键字实现描红功能。复制代码代码如下:<...
    用do....while循环语句输出付费信息与查询关键字相匹配的信息资源,并用str_ireplace()函数对查询关键字实现描红功能。

     
    复制代码代码如下:
    1. <?php
    2.                 if($info1){
    3.                 do{
    4.                ?>
    5.                   <table width="540" border="0" cellspacing="0" cellpadding="0">
    6.                     <tr>
    7.                       <td height="26"><?php echo str_ireplace($content,"".$content."",$info1[type]);?>&nbsp;<?php echo str_ireplace($content,"".$content."",$info1[title]);?>&nbsp;&nbsp;<?php echo str_ireplace($content,"".$content."",$info1[edate]);?></td>
    8.                     </tr>
    9.                     <tr>
    10.                       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo str_ireplace($content,"".$content."",$info1[content]);?></td>
    11.                     </tr>
    12.                     <tr>
    13.                       <td height="26">&nbsp;联系人:<?php echo str_ireplace($content,"".$content."",$info1[linkman]);?>&nbsp;&nbsp;&nbsp;联系电话:<?php echo str_ireplace($content,"".$content."",$info1[tel]);?></td>
    14.                     </tr>
    15.                     <tr>
    16.                       <td height="3" background="Images/line1.gif"></td>
    17.                     </tr>
    18.                   </table>
    19.                 <?php
    20.                 }while($info1=mysql_fetch_array($sql1));
    21.                 ?>

    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-10-382-1.html
    相关热词搜索: str_ireplace 关键字
    上一篇:php Sqlhelper类