search

Home  >  Q&A  >  body text

What should I do if I want to output a certain array name with a three-digit array?

微信图片_20190124162926.png

孙广宇孙广宇2184 days ago1316

reply all(2)I'll reply

  • 未完待续。。。

    未完待续。。。2019-01-27 09:42:21

    If you just output the two words 'Beijing':

    $area = array(

    'china' => array(

    ' 'Shanghai ',

    ', Hubei ',

    ##' Beijing '= & GT; Array (

    ##' HD '= & GT;'

    ##) ##) ##)

    # )

    );

    //Get the key name, turn it into a one-dimensional array and then get the value

    $new_arr = array_keys($area['china' ]);

    //print_r($new_arr);

    /*Array

    (

    [0] => 0

    [1] => 1

    [2] => Beijing

    )*/

    echo $new_arr[2];

    reply
    0
  • Cancelreply