I am aware that I can use array_unique(array_merge($a,$b));
to merge two arrays and then remove any duplicates,
but,
is there an individual function that will do this for me?
(I know I could write one myself that just calls these, but I am just wondering).
There is no such function. Programming languages in general give you a certain set of tools (functions) and you can then combine them to get the results you want.
There really is no point in creating a new function for every use case there is, unless it is a very common use case - and yours does not seem to be one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With