How to access nested array values

后端 未结 6 1857
轮回少年
轮回少年 2021-01-26 18:03

I have the following array that I need to use in a laravel email view template

$inputs[\'test\']

Which looks like this when I dd($inputs[

6条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 18:22

    $myEcho = function($x){
        if(is_array($x)){foreach($x as $one){$myEcho($one);}
        }else{ echo $x; }
      };
    array_map($myEcho, $inputs['test']['order']);
    

提交回复
热议问题