Home > Software engineering >  Flatten Array php
Flatten Array php

Time:09-24

I'm trying to flat a multidimensional array to a given specific format. I have a tree that is saved as a nested array, which is ok, but the function given to render the array in the UI expects only one array and, per each child, an independent array. Instead of the nested array, each option should be at the same level.

This is how my var_dump of my array:

(
    [id] => 1
    [name] => some data.
    [emoji] =>            
  • Related