function _fancybox_array_diff_assoc_recursive in fancyBox 7.2
An implementation of a multidimensional array_diff function.
Parameters
$array1 array: The array to compare from.
$array2 array: The array to compare against.
Return value
array An array containing all the entries from array1 that are not in array2.
1 call to _fancybox_array_diff_assoc_recursive()
- _fancybox_filter_settings in ./
fancybox.module - Filter out default values and format settings before sending to javascript.
File
- ./
fancybox.module, line 623 - Provides the fancyBox jQuery plugin, a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages, and an extensive settings page for configuring fancyBox settings and how fancyBox…
Code
function _fancybox_array_diff_assoc_recursive($array1, $array2) {
$return = array();
if (empty($array1)) {
return $array2;
}
foreach ($array1 as $key => $value) {
if (array_key_exists($key, $array2)) {
if (is_array($value)) {
$recursive_diff = _fancybox_array_diff_assoc_recursive($value, $array2[$key]);
if (sizeof($recursive_diff)) {
$return[$key] = $recursive_diff;
}
}
else {
if ($value != $array2[$key]) {
$return[$key] = $value;
}
}
}
else {
$return[$key] = $value;
}
}
return $return;
}