I have an array like this:
array(\"a\" => 2, \"b\" => 4, \"c\" => 2, \"d\" => 5, \"e\" => 6, \"f\" => 2)
Now I want to fi
I might do something like:
$newarray = array(); foreach ($jsonarray as $testelement){ if ($testelement == 2){$newarray[]=$testelement} } $result = count($newarray);