array_key_exists() 可以查找2维数组的 键名吗,该如何解决

WBOY
Release: 2016-06-13 13:53:45
Original
1082 people have browsed it

array_key_exists() 可以查找2维数组的 键名吗
array 

1 => '1234',
3 => 'ssssaaaa',
 'ssssaaaa' => array ( 19 => 'sssssss', ), 
4 => '11111',
5 => '222222',
6 => '33333',
7 => '111111',
8 => '1233455', 
9 => '321', 
10 => '123', 
11 => '111', 
12 => '12345', 
13 => '1234', 
14 => '1234',
20 => 'lirui', 
'lirui' => array ( 23 => 'ssss', 22 => '432132', 21 => '1234', ), 


比如上面2个2维的数组, lirui,ssssaaaa

------解决方案--------------------
看名称都知道 这个函数是返回KEY存不存在 查找一个数组的所有键名 用 print_r(array_keys($arr['lirui']));

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template