diff --git a/www/lib/CoreLibs/Combined/ArrayHandler.php b/www/lib/CoreLibs/Combined/ArrayHandler.php index bbe3943f..b1002949 100644 --- a/www/lib/CoreLibs/Combined/ArrayHandler.php +++ b/www/lib/CoreLibs/Combined/ArrayHandler.php @@ -509,6 +509,22 @@ class ArrayHandler } return $array; } + + /** + * Remove entries from a simple array, will not keep key order + * + * any array content is allowed + * + * https://stackoverflow.com/a/369608 + * + * @param array $array Array where elements are located + * @param array $remove Elements to remove + * @return array Array with $remove elements removed + */ + public static function arrayRemoveEntry(array $array, array $remove): array + { + return array_diff($array, $remove); + } } // __END__