I have a PHP array $data that looks like this...
Array
(
    [section] => Array
        (
            [345dfg] => Array
                (
                    [test] => Array
                        (
                            [name] => John
                        )
                )
            [567fghj] => Array
                (
                    [test] => Array
                        (
                            [name] => Tom
                        )
                )
        )
    [othersection] => Array
        (
            [result] => 2
        )
)
I am trying to loop through each item in section so am doing this...
foreach ($data[section] as $section) {
    echo $section[test][name];
}
It is working correctly but in my error log I get...
PHP Warning:  Use of undefined constant section- assumed 'section' (this will throw an Error in a future version of PHP)
Where am I going wrong?
 
     
    