发现在一个简单的数组元素的位置 [英] Finding the position of an element in a simple array
本文介绍了发现在一个简单的数组元素的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
让我们说我们有这个数组:
Let's say we have this array:
Array ( [0] => 10 [1] => 45 [2] => 23 )
我怎么能确定元素'45'这个阵列中的位置?
How can I determine the position of element '45' in this array?
我使用PHP。
感谢您。
推荐答案
谷歌救援: array_search
Google to the rescue: array_search
这篇关于发现在一个简单的数组元素的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文