Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- output:
- (
- google.com => Array(
- 0 => cloud
- )
- microsoft.com => Array(
- office => Array(word,excel),
- azur
- )
- )
- function recursive_loop($array)
- {
- foreach($array as $key => $value)
- {
- if((is_array($value)))
- {
- recursive_loop($value);
- }
- else
- {
- echo $value . PHP_EOL;
- }
- }
- }
- echo recursive_loop($food);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement