Solution for "get keys from array in array"

<?php $array = array(     'fruit1' => 'apple',     'fruit2' => 'orange',     'fruit3' => 'grape',     'fruit4' => 'apple',     'fruit5' => 'apple'); // this cycle echoes all associative array // key where value equals "apple" while ($fruit_name = current($array)) {     if ($fruit_name == 'apple') {         echo key($array).'<br />';     }     next($array); } ?>

php get array key

Similar codes for "get keys from array in array"


Latest 'PHP' questions

Added before "get keys from array in array"