Anonymous user / 44.222.146.114 Log In Register
?
Wallet: 3.00
Daily Credits:
1.20 / 1.20

PHP Functions Online


array_intersect_assoc

(PHP 4 >= 4.3.0, PHP 5)

array_intersect_assocComputes the intersection of arrays with additional index check

array array_intersect_assoc(array $array1 , array $array2[, array $...])

Checkout ? #

Item Description Item Price Your Price
Total

Preview #

${{ variable.param.name }} = {{ variable.param|getValue:variable.form:true }};
{{ call.result}} = ;

Description #

array array_intersect_assoc ( array $array1 , array $array2 [, array $... ] )

Parameters #

array1

The array with master values to check.

array2

An array to compare values against.

...

A variable list of arrays to compare.

Return Values #

Returns an associative array containing all the values in array1 that are present in all of the arguments.

Examples #

Example #1 array_intersect_assoc() example

<?php
$array1 
= array("a" => "green""b" => "brown""c" => "blue""red");
$array2 = array("a" => "green""b" => "yellow""blue""red");
$result_array array_intersect_assoc($array1$array2);
print_r($result_array);
?>

The above example will output:

Array
(
    [a] => green
)

See Also #