I would like to count occurencies of elements in a coldfusion 8 array.
Posted on 2008-10-28
I'm using a form with chexboxes to feed a SQL database, the cells are feed with a string of numbers (12,34,4, 6, 12, 34, 7).
Those numbers are ratingIDs of an imageID wich is part of a gallery.
A set of imageIDs rated define the ratingIDs of a movie.
To do so, i need to concatenate and count all the strings of numbers for the gallery set (all images for a given movie)
And use occurrence of numbers to sort desc and keep the 5 highgest occurence of the ratingID.
I reached to put all the strings in an array (1), but i can't find out how to count the elements of the array and output a result.
Thanks for helping!