I've this array in PHP code to display some datas in a form:
Array
(
[datas] => Array
(
[datas] => Array
(
[1] => Array
(
[options] => Array
(
[0] => Array
(
[left] => Left align
[center] => Center
[right] => Left align
)
)
)
)
)
)
How can I loop and display the options details ?
This is what I have tried:
foreach ($arr['datas']['datas'] as $data) {
foreach($data['options'] as $optionId=>$optionName) {
echo 'key: ' . $optionId;
echo 'value: ' . $optionName;
}
}
But it doesn't work.
Thanks.