I need help in finding "unique" values in an array without using array_unique.
The array in question is built off a dynamic query and typically has anywhere from 10-400 elements. The elements look something like this:
'1' => 'IN,M,148,1,NDC-NATIONAL DATA CORP,,,48,,,1'
'2' => 'IN,M,93,1,PCS,,,99,,,1'
'3' => 'IN,M,100,1,ALTARX,,,34,,,1'
'4' => 'IN,M,148,1,NDC- NATIONAL DATA CORP,,,48,,,1'
The problem I'm finding is the space in key #4. Even though key #1 and key#4 are the same, the space is enough for array_unique to leave key #4 as an unique key (rightly so since it is unique).
Since I don't have a method of controlling what is typed into that particular field, I'd like to be able to create an array built off the number immediately after the IN,M, sequence.
Any tips, suggestions would be greatly appreciated. 🙂