首页 > 编程语言 > 详细

array_intersect_uassoc — 带索引检查计算数组的交集,用回调函数比较索引

时间:2020-05-09 18:35:30      阅读:33      评论:0      收藏:0      [点我收藏+]

 

说明

array_intersect_uassoc ( array $array1 , array $array2 [, array $... ], callable $key_compare_func ) : array

array_intersect_uassoc() 返回一个数组,该数组包含了所有在 array1 中也同时出现在所有其它参数数组中的值。注意和 array_intersect() 不同的是键名也用于比较。

参数

 

array1

Initial array for comparison of the arrays.

array2

First array to compare keys against.

...

Variable list of array arguments to compare values against.

key_compare_func

在第一个参数小于,等于或大于第二个参数时,该比较函数必须相应地返回一个小于,等于或大于 0 的整数。直线导轨滑台

callback ( mixed $a, mixed $b ) : int

 

返回值

Returns the values of array1 whose values exist in all of the arguments. 

array_intersect_uassoc — 带索引检查计算数组的交集,用回调函数比较索引

原文:https://www.cnblogs.com/furuihua/p/12859177.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!