I need to read nested arrays without knowing how the array will look.
For example;
$data = array(
'Data1_lvl1' => array(
'Data1_lvl2' => "value",
'Data2_lvl2' => array(
'Data1_lvl3' => "value"
)
),
'Data2_lvl1' => 'value'
);
Needs to be formatted to strings like:
- Data1_lvl1/Data1_lvl2/
- Data1_lvl1/Data2_lvl2/Data1_lvl3/
- Data2_lvl1/
But the array can be of any size with any number of nested arrays inside it.
array_walk_recursivefunction of PHP. refer php.net/manual/en/function.array-walk-recursive.php