PHP的array_search()执行此操作:
Searches the array for a given value and returns the corresponding key if successful
您可以使用方括号语法,如下所示:
原文链接:https://www.f2er.com/php/136189.html$arr = array("key" => "value"); $v = $arr["key"]; // returns "value"