Is there any better (= quicker ) solution to get all keys of value in array than foreach loop with if?
$array = array(\'apple\', \'orange\', \'pear\', \'banana\'
function array_search_values( $m_needle, $a_haystack, $b_strict = false){
return array_intersect_key( $a_haystack, array_flip( array_keys( $a_haystack, $m_needle, $b_strict)));
}
$array = array('apple', 'orange', 'pear', 'banana', 'apple',
'pear', 'kiwi', 'kiwi', 'kiwi');
print_r( array_search_values( 'kiwi', $array,true));