Welcome Guest, Not a member yet? Register   Sign In
Poll: Should CI4 have this function?
You do not have permission to vote in this poll.
Yes
30.00%
3 30.00%
No
70.00%
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
#1

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?
Reply
#2

I've never had to look for duplicates
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply
#3

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 )
Reply
#4

I only use array_unique to remove values from an array, I have no need to find which keys are duplicates.
Reply
#5

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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB