I have a long string, and an array of country names. So the array looks something like this:
array('Afghanistan', 'Bulgaria', 'United States', 'Bulgaria', ...)
I need to count the number of times each country appears in the string. Is there a quick and nifty way of doing this, i.e., some kind of magical preg_match_all which receives an array of patterns, or must I iterate through all countries?