Poll: Should CI4 have this function? You do not have permission to vote in this poll. |
|||
Yes | 3 | 30.00% | |
No | 7 | 70.00% | |
Total | 10 vote(s) | 100% |
* You voted for this item. | [Show Results] |
array_duplicate_by() helper to get duplicate array by column |
A new Array helper has been proposed.
See https://github.com/codeigniter4/CodeIgniter4/pull/8436 It returns duplicate elements in an array by key(s): PHP Code: $duplicate = array_duplicate_by($key, $data); Do you think CI4 should have the function, or you don't need it?
I've never had to look for duplicates
I say No, it would be a method that would be hardly used and would add bloat to CI..
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I only use array_unique to remove values from an array, I have no need to find which keys are duplicates.
Will be use for upload batch by excel, I made this so that when uploading master data like hospital or member it immediately rejects duplication. This function returning duplication data for make excel again. Its not important, I just share my function in real case. It all depends on whether the final results of the voting are useful for other people
|