Print Single Value Of Multi Dimensional Array in PHP

前端 未结 2 1006
深忆病人
深忆病人 2021-01-24 23:45

I am using following array

 Array
 (
    [0] => Array
     (
        [id] => 6
        [key] => SITE_NAME
        [value] => Webg Smarty CMS Small
           


        
2条回答
  •  借酒劲吻你
    2021-01-25 00:00

    Try this

    foreach($yourArr as $key => $value)
    {
      echo $value['value'];
    }
    

    OR

    echo $yourArr[0]['value'];  //print value of first element
    echo $yourArr[0]['key'];    //print key of first element
    

提交回复
热议问题