不用搞了。我搞定了。。
foreach($jg as $value){
    if($value['province_code']=='AH')
    {
        $xinjg=$value['citys'];
    }
}
echo '<pre>';print_r($xinjg);echo '<pre>';

解决方案 »

  1.   

    array_filter --  用回调函数过滤数组中的单元
      

  2.   


    $arr = array(
        array(
            'province_code' => 'AH',
            'province' => '广东',
            'citys' => array(
                array(
                    'city_name' => '广州',
                    'city_code' => 'AH_GZ'
                ),
            )
        ),
        array(
            'province_code' => 'BH',
            'province' => '广西',
            'citys' => array(
                array(
                    'city_name' => '南宁',
                    'city_code' => 'AH_NN'
                ),
            )
        ),
    );echo '<meta http-equiv="content-type" content="text/html;charset=utf-8">';$result = array_filter($arr, "callback");
    $citys = $result[0]['citys'];print_r($citys);function callback($input){
        return $input['province_code']=='AH'? true : false;
    }