很简单的,用str_replace或正则表达式。$res=mysql_query("查询条件");//we get the record set
while($r=mysql_fetch_array($res)){
echo str_replace($keyword,"<font color=red>".$keyword."</font>",$r["title"];}
while($r=mysql_fetch_array($res)){
echo str_replace($keyword,"<font color=red>".$keyword."</font>",$r["title"];}
问问斑竹吧,他可能知道其他函数的。