Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Count multiple values in an array

$
0
0

Hey,

there are many guides on the internet that show how to count the occurance of a value in an array.

for example count how many 2`s are in an array 1,2,2,3, its: 2

 

However I couldnt find how to count multiple values, like how many 1`s and 2`s together are in 1,2,2,3, its: 3.

 

Thanks for any help!


Viewing all articles
Browse latest Browse all 13200

Trending Articles