Ben uzun bir dize, ve ülke adları bir dizi var. Yani dizi şöyle:
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?