viernes, 7 de febrero de 2025

getting the key name for a value

<? $array = [ 'a' => 'dog', 'b' => 'cat', 'c' => 'cow', 'd' => 'duck', 'e' => 'goose', 'f' => 'elephant' ]; print_r(array_find_key($array,function($v){ return ($v=="goose");})); ?>

No hay comentarios:

Publicar un comentario