SHARE
TWEET

Untitled

a guest Jun 17th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. output:
  2. (
  3. google.com => Array(
  4. 0 => cloud
  5. )
  6. microsoft.com => Array(
  7. office => Array(word,excel),
  8. azur
  9. )
  10. )
  11.  
  12. function recursive_loop($array)
  13. {
  14. foreach($array as $key => $value)
  15. {
  16. if((is_array($value)))
  17. {
  18. recursive_loop($value);                
  19. }
  20. else
  21. {
  22. echo $value . PHP_EOL;
  23. }
  24. }
  25.  
  26. }
  27.  
  28. echo recursive_loop($food);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top