I have a variable that contain string of numbers which are unique ids to some records stored in a database table. The string value could look like this "3,4,4,6,2,4,7,7,7" etc.
I use explode() function to turn those numbers into an array so that I can use a loop and retrieve the records they identify. I use array_unique() to remove reoccurring numbers but I still need a way to know how many times a particular number occurred in the string. Please how could I do that? Thank you.
I have a variable that contain string of numbers which are unique ids to
Share
Use:
it give you