It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Count recurring elements in an array

Moderator: dafunkymunky

Count recurring elements in an array

Postby jameshpg on Wed Feb 14, 2007 12:46 pm

Hi all,

So i've got an array to hold names and I want to count how many times a name is held in the array. For example,

John
John
James
John
James
Jack
Luke
John
Jack
Luke

If this was my array then I need a way to count how many times each name appears:
John = 4
James = 2
Jack = 2
Luke = 2

Does anyone know of a way to do this? Its reallllyyyyy important!

Regards,

james
jameshpg
 
Posts: 0
Joined: Wed Feb 14, 2007 12:43 pm

Who is online

Users browsing this forum: No registered users and 7 guests