10 个救命的 PHP 代码片段.docVIP

  • 5
  • 0
  • 约4.38千字
  • 约 5页
  • 2018-03-07 发布于河南
  • 举报
10 个救命的 PHP 代码片段

10 个救命的 PHP 代码片段 时间:2011-09-02 09:20 来源:开源中国社区 作者:红薯 点击: 2047 次 【字号:大 中 小】 关键词高亮 function highlight( $sString , $aWords ){ if (! is_array ( $aWords )|| empty empty ( $aWords )||! is_string ( $sString )){ return false; } $sWords =implode( | , $aWords ); return preg_replace( @\b( . $sWords . )\b@si , st ??? ?  关键词高亮 function?highlight($sString,?$aWords)?{? ????if?(!is_array?($aWords)?||?emptyempty?($aWords)?||?!is_string?($sString))?{? ????????return?false;? ????}? ? ????$sWords?=?implode?(|,?$aWords);? ????return?preg_replace?(@\b(.$sWords.)\b@si,?strong?style=background-color:yellow$1/strong,

文档评论(0)

1亿VIP精品文档

相关文档