$r[title] = esub($r[title],8,'...'); //截取前8个字符,多出部分用...代替$r[title] = str_replace("lhj","",$r[title]); //替换指定文本$str='<li><div class="p"><span class="txt">'.$r[title].'</span></div></li>';