摘要: php二维数组的去重策略,如果需要根据某字段去重(其他字段可能不一致),那么需要使用循环策略,如果去重的都是相同的(字段,值),那么可以用序列化方式。 $allComments = array_map('serialize', $allComments); $allComments = array_unique($allComments); $allComments = array_map('unserialize', $allComments);此方法是将待去重数组序列... 阅读全文
posted @ 2014-04-04 11:32 ..孔雀翎.. 阅读(540) 评论(0) 推荐(0) 编辑