1
Array
(
    [return] => Array
        (
            [0] => Array
                (
                    [0] => Array
                        (
                            [test] => 1
                        )

                )

        )

    [error_row] => Array
        (
            [0] => test
        )

)

How can I get the test in [error_row] using foreach loop? Already tried this multidimensional and also this multidimensional2 but get no answer it those two question.

Community
  • 1
  • 1

1 Answers1

0

the simple one is $array['error_row'][0];

if you want to use foreach

$result = '';
foreach($array as $k => $v)
{
  if($k == 'error_row');
  $result = $v[0];
}
LF00
  • 27,015
  • 29
  • 156
  • 295