Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function displayArray(array $array, int $depth)
- {
- foreach ($array as $key => $value) {
- if (is_array($value)) {
- // C'est un tableau
- echo ' --- ' . $key . " --- \n";
- displayArray($value, $depth++);
- } else {
- // Affichage
- echo $key . ' = ' . $value . "\n";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement