Send json in HTTP POST request by CURL php

A simple post operation by php curl. And send some json data.

Count matching values of a array in PHP

Very simple function to count matching values of a array. Output: Array ( [1] => uk [2] => usa [5] => roi [7] => uae [8] => bd ) Array ( [uk] => 3 [usa] => 1 [roi] => 2 [uae] => 1 [bd] => 4 )