Home > php教程 > php手册 > php过滤字符串内容的

php过滤字符串内容的

WBOY
Release: 2016-05-25 16:56:44
Original
1235 people have browsed it

下面举了二个实现来告诉你如何过滤重复的内容,有需要的朋友可以参考

 

foreach($arr as $value){ 
   if(!empty($value)){ 
     $strs=strstr($value,"新闻");
   }
}
Copy after login

输出:新闻 新闻

直接用array_unique 函数就可以了。

 

$string= '数组aabbccdd'; 
function str_split_utf8($str) { 
$split=1; 
$array = array(); 
for ( $i=0; $i  127){ 
if($value >= 192 && $value = 224 && $value = 240 && $value <p><br>这里有篇参考文章</p><p>php教程er/21/899e11a21ae817a97d3ce64f851ab9f6.htm">http://www.phprm.com/phper/21/899e11a21ae817a97d3ce64f851ab9f6.htm</p><div class="ad_580" id="ad_580"></div> <p>本文地址:</p><p>转载随意,但请附上文章地址:-)</p> 
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template