php 关联数组过滤器重复

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 关联数组过滤器重复相关的知识,希望对你有一定的参考价值。

@php
// dedup brands/urls - array_unique handles associative arrays with the SORT_REGULAR option
$itembrand = array_unique($itembrand_with_dups, SORT_REGULAR);

// sort brands/urls
usort($itembrand, function ($a, $b) { return strcmp($a['brand'], $b['brand']); });
@endphp 

以上是关于php 关联数组过滤器重复的主要内容,如果未能解决你的问题,请参考以下文章