I have a one dimensional array of integers (single and double digit full numbers).
I would like to detect the presence of duplicate numbers, then identify all the elements of the array that are duplicates, return and extract them and change these duplicate numbers one by one to different numbers, based on my rules, re-insert the new numbers into the original array (that now has only unique numbers left in it) and keep checking for duplicates and changing the numbers until all array elements are unique.
I have tried array_intersect, but that only returns the values of the duplicates not all the elements that are duplicates and tried playing around with array_count_values but that didn't produce either.
Thanks for badly needed insights...
Thank you very much
Bo