All pastes #424583 Raw Edit

Someone

public text v1 · immutable
·published 2007-04-04 21:53 UTC
rendered paste body
table
+-------------+
| id          |
| description |
| parent      |
| order       |
+-------------+

Can that data be put in an array with a tree structure like this

+ id,description
|       +---------+ id,description  
|                 + id,description  
|                 + id,description  
+ id,description
|       +---------+ id,description  
|                 + id,description  
|                 |       +---------+ id,description  
|                 |                 + id,description  
|                 + id,description  
+ id,description
        +---------+ id,description  
                          +---------+ id,description  
                                    + id,description


doing it in this way: array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x','y','z'))
doesn't put a description for 'c'