I am basically pasting this from another forum where I saw it asked (with nobody answering). It is essentially the exact same thing im trying to do:
In ASP classic, is there a way to count the number of times a string appears in an array of strings and output them based on string and occurrence count?
For example if I have an array which contains the following :
hello
happy
hello
hello
testing
hello
test
happy
The output would be:
hello 4
happy 2
test 1
testing 1
Thanks!
I’m assuming the language is VBScript (since that’s what most people use with classic ASP).
You can use a
Dictionaryobject to keep track of the individual counts: