0

I have an array

$available_fields = 
Array
(
[316] => test1111
[317] => testsssss1
[318] => 12331
[323] => Array
    (
        [0] => Photo General Inspection small
        [1] => Photo General Inspection medium
        [2] => Photo General Inspection large
    )

)

One or some of the values will be arrays. I want to loop through the array with

foreach ($available_fields as $field_id => $label){
            'do something';
        }

how can I fix the array in a way that it will not cause an error, and have the $field_id as [323] and $label as Photo General Inspection small.

0 Answers0