I have this JSON string that has been converted into a PHP array:
Array (
[textfield] => Array (
[elements] => Array (
[0] => Array (
[type] => textField
)
)
[title] => textfield
)
[textarea] => Array (
[elements] => Array (
[0] => Array (
[type] => textArea
)
)
[title] => textarea
)
) textfield
And I'm trying to loop through it and print out the type and title of each array. This is what I have so far:
foreach($inputs as $key => $jsons) {
foreach($jsons as $key => $value) {
echo $value;
}
}
But that only prints out the title. Note, I do actually need to loop through the array and get all the values because I need to use them, I know I could use print_r to just dump the array but that's not what I need!