我正在尝试做一个thig,但我没有得到重点。任何人请建议我.. 二维数组如下
$array = Array
([1] => Array
([1] => EST_ID
[2] => EST_CODE
[3] => EST_EXT
[4] => EST_NAME
[5] => INCROP_ADDRESS1
[6] => INCROP_ADDRESS2
[7] => INCROP_CITY
[8] => INCROP_DIST
[9] => INCROP_STATE
[10] => INCROP_PIN
)
[2] => Array
([1] => HRKNL0006923000
[2] => 6923
[4] => VAIBHAV CARPETS
[5] => BHUL-BHULIA CHOWK
[6] => BODHWA RAM COLONY
[7] => PANIPAT
[8] => PANIPAT
[10] => 132103)
[3] => Array
([1] => HRKNL0004638000
[2] => 4638
[4] => GURU TEG BHADUR PUBLIC SCHOOL
[5] => MODEL TOWN
[6] => KARNAL
[7] => KARNAL
[8] => KARNAL
[10] => 132001)
)
我必须从$ array
中搜索2或3的数组键答案 0 :(得分:0)
不完全确定您需要哪一个,因为我没有完全理解这个问题,但这两个功能中的一个会有用array_key_exists()或in_array()
答案 1 :(得分:0)
听起来你可能正试图按我在Search a multi-dimensional array for certain values
中所做的那样做