All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
PHP代码:从数组里塞选出重复的数据_php资料_编程技术

Writer: aaa Article type: Programming skills(编程技巧) Time: 2013/12/27 19:52:33 Browse times: 288 Comment times: 0

PHP代码:从数组里塞选出重复的数据_php资料_编程技术


Head photo

Go homepage
Upload pictures
Write articles

PHP代码:从数组里塞选出重复的数据_php资料_编程技术-你的首页-uuhomepage.com
$num = count($array);
if($num)
{
sort($array);
}
if($num!=0)
{
$m = $array[0];
$n = 0;
$kind=1;
echo $array[0]."----------";
for($z=0;$z<$num;$z++)
{
if($m!=$array[$z])
{
echo $array[$z-1]." ";
echo $array[$z];
$kind=0;
$m=$array[$z];
}
$n++;
$m++;
//echo $array[$z]."'/n'";
}
if($kind==1)
{
echo $array[$num-1]."重复的数据! ";
}
?>





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.