Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 18:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/8c4c6408ed2dad2c647ade8909c7c35b to your computer and use it in GitHub Desktop.
<?php
$mascotas = ["Maggie", "Petra", "Misifú"];
$busqueda = "Maggie";
$indice = array_search($busqueda, $mascotas, true);
echo "La mascota $busqueda está en el índice $indice";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment