$array[]=1; $array[]=2; $array[]=3; $array[]=4; $array[]=5; $array[]=6; foreach($array as $key){ if($key%2 == 0) echo "El valor de este array es: $key <br>"; }