Home  >  Article  >  Backend Development  >  这句话翻译一下,如何理解

这句话翻译一下,如何理解

WBOY
WBOYOriginal
2016-06-23 13:45:54842browse

in_array($_GET['act'],array_keys($output['search_type']))

感觉有点绕,如何理解?


回复讨论(解决方案)

array_keys($output['search_type'])获取$output['search_type']这个数组里面所有键然后组成一个新数组
in_array($_GET['act'],array_keys($output['search_type']))判断$_GET['act']这个值在不在新数组里面
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn