johnsmith153 Posted October 9, 2008 Share Posted October 9, 2008 I need to CREATE unique values for all matching arrays, so, if I start with: $array[0]="Jim Smith"; $array[1]="Dave Brown"; $array[2]="Dennis Brown"; $array[3]="Steve Smith"; I need to return the surname, but if not unique, I need to append the first letter of name, then keep checking to ensure unique So I would then end with: $array[0]="J.Smith"; $array[1]="Da.Brown"; $array[2]="De.Brown"; $array[3]="S.Smith"; Any ideas? Link to comment https://forums.phpfreaks.com/topic/127721-check-if-value-in-array-is-unique-and-change-all-duplicates-if-not/ Share on other sites More sharing options...
F1Fan Posted October 9, 2008 Share Posted October 9, 2008 You'll have to write a function that does this. Link to comment https://forums.phpfreaks.com/topic/127721-check-if-value-in-array-is-unique-and-change-all-duplicates-if-not/#findComment-660973 Share on other sites More sharing options...
kenrbnsn Posted October 9, 2008 Share Posted October 9, 2008 Please don't double post. This one locked. Ken Link to comment https://forums.phpfreaks.com/topic/127721-check-if-value-in-array-is-unique-and-change-all-duplicates-if-not/#findComment-660975 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.