Skip to content

Instantly share code, notes, and snippets.

@thproflord
Created February 6, 2017 19:37
Show Gist options
  • Save thproflord/1fff0764ce2582f2cffa8c658734a26f to your computer and use it in GitHub Desktop.
Save thproflord/1fff0764ce2582f2cffa8c658734a26f to your computer and use it in GitHub Desktop.
hola
$arreglo = array(
'a' => 1,
'b' => 2,
'c' => 3,
'd' => 4,
'e' => 5,
'f' => 6
);
$palabra = 'ole amigo como estas feo';
$cont = 0;
while($cont < 24){
array_key_exists($palabra[$cont], $arreglo) ? "Existe $palabra[$cont] en $cont" : "no existe $palabra[$cont]";
$cont++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment