This array is dynamic and can have any number of records and can have any level of nested array:
Array
(
[name] => richard
[email] => [email protected]
[address] => Array
(
[city] => paris
[zip] => 12121
)
[address1] => Array
(
[city] => paris
[zip] => 12121
)
[address3] => Array
(
[city] => paris
[zip] => 12121
)
)
I am trying to construct a string from nested array keys. I need to construct string like this from keys using loop:
Result should be like:
address.city
address.zip
address1.city
address1.zip....so on
How can it be achieved using recursion ?