Last active
November 22, 2018 20:04
-
-
Save sidneydemoraes/ac14b8c5d8a7918c3f6a1e8e0b0e1bd7 to your computer and use it in GitHub Desktop.
Implosão Recursiva de Array PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function multi_implode($array, $parent = '') { | |
$ret = ''; | |
foreach ($array as $key => $value) { | |
if (is_array($value)) { | |
$ret .= multi_implode($value, $parent . $key . '=>'); | |
} else { | |
$ret .= $parent . $key . '=>' . $value . "\n"; | |
} | |
} | |
return $ret; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment