SHOW:
|
|
- or go back to the newest paste.
| 1 | - | [{
|
| 1 | + | <?php |
| 2 | $s.='[{
| |
| 3 | "id":1, | |
| 4 | "text":"City", | |
| 5 | "children":[{
| |
| 6 | "id":11, | |
| 7 | "text":"Wyoming", | |
| 8 | "children":[{
| |
| 9 | "id":111, | |
| 10 | "text":"Albin" | |
| 11 | },{
| |
| 12 | "id":112, | |
| 13 | "text":"Canon" | |
| 14 | },{
| |
| 15 | "id":113, | |
| 16 | "text":"Egbert" | |
| 17 | }] | |
| 18 | },{
| |
| 19 | "id":12, | |
| 20 | "text":"Washington", | |
| 21 | "state":"closed", | |
| 22 | "children":[{
| |
| 23 | "id":121, | |
| 24 | "text":"Bellingham" | |
| 25 | },{
| |
| 26 | "id":122, | |
| 27 | "text":"Chehalis" | |
| 28 | },{
| |
| 29 | "id":123, | |
| 30 | "text":"Ellensburg" | |
| 31 | },{
| |
| 32 | "id":124, | |
| 33 | "text":"Monroe" | |
| 34 | }] | |
| 35 | - | }] |
| 35 | + | |
| 36 | }]'; | |
| 37 | ||
| 38 | $json=json_decode($s, TRUE); | |
| 39 | echo '<pre>';print_r($json); |