note 128653 added to function.array-diff-uassoc

From: Date: Sat, 01 Jul 2023 08:32:25 +0000
Subject: note 128653 added to function.array-diff-uassoc
Groups: php.notes 
Request: Send a blank email to php-notes+get-220613@lists.php.net to get a copy of this message
<?php function key_compare_func($a, $b) { if ($a === $b) { return 0; } return ($a > $b)? 1:-1; } $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $result = array_diff_uassoc($array2, $array1, "key_compare_func"); print_r($result); ?> //output will be Array ( [1] => yellow ) ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.168 (proxied: 49.205.197.98) ---- Manual Page -- https://php.net/manual/en/function.array-diff-uassoc.php Edit -- https://main.php.net/note/edit/128653 Del: integrated -- https://main.php.net/note/delete/128653/integrated Del: useless -- https://main.php.net/note/delete/128653/useless Del: bad code -- https://main.php.net/note/delete/128653/bad+code Del: spam -- https://main.php.net/note/delete/128653/spam Del: non-english -- https://main.php.net/note/delete/128653/non-english Del: in docs -- https://main.php.net/note/delete/128653/in+docs Del: other reasons-- https://main.php.net/note/delete/128653 Reject -- https://main.php.net/note/reject/128653 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220613) next »