I have an array like this:
array(\"a\" => 2, \"b\" => 4, \"c\" => 2, \"d\" => 5, \"e\" => 6, \"f\" => 2)
Now I want to fi
foreach ($aray as $key => $value) { if (2 != $value) { unset($array($key)); } } echo 'Items in array:' . count($array);