导读:用do....while循环语句输出付费信息与查询关键字相匹配的信息资源,并用str_ireplace()函数对查询关键字实现描红功能。复制代码代码如下:<...
用do....while循环语句输出付费信息与查询关键字相匹配的信息资源,并用str_ireplace()函数对查询关键字实现描红功能。
复制代码代码如下:
- <?php
- if($info1){
- do{
- ?>
- <table width="540" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td height="26">『<?php echo str_ireplace($content,"".$content."",$info1[type]);?>』 <?php echo str_ireplace($content,"".$content."",$info1[title]);?> <?php echo str_ireplace($content,"".$content."",$info1[edate]);?></td>
- </tr>
- <tr>
- <td height="26"> <?php echo str_ireplace($content,"".$content."",$info1[content]);?></td>
- </tr>
- <tr>
- <td height="26"> 联系人:<?php echo str_ireplace($content,"".$content."",$info1[linkman]);?> 联系电话:<?php echo str_ireplace($content,"".$content."",$info1[tel]);?></td>
- </tr>
- <tr>
- <td height="3" background="Images/line1.gif"></td>
- </tr>
- </table>
- <?php
- }while($info1=mysql_fetch_array($sql1));
- ?>