Home  >  Article  >  Backend Development  >  怎样获得数组中某一个指定数据所在的位置?多谢

怎样获得数组中某一个指定数据所在的位置?多谢

WBOY
WBOYOriginal
2016-06-13 12:34:13911browse

怎样获得数组中某一个指定数据所在的位置?谢谢
我有一组数据,里边的每个元素数据是固定的,但是数据的位置是变化的。我用哪个函数可以获取其中某个元素的位置?
比如:[lili,mali,xiaoli,liuli,zhangli,wangli,luli]
我怎样获得wangli在数组中所处的位置?现在是5,取得这个数字即可。谢谢。

数组 php基础函数
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