Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $s.='[{
- "id":1,
- "text":"City",
- "children":[{
- "id":11,
- "text":"Wyoming",
- "children":[{
- "id":111,
- "text":"Albin"
- },{
- "id":112,
- "text":"Canon"
- },{
- "id":113,
- "text":"Egbert"
- }]
- },{
- "id":12,
- "text":"Washington",
- "state":"closed",
- "children":[{
- "id":121,
- "text":"Bellingham"
- },{
- "id":122,
- "text":"Chehalis"
- },{
- "id":123,
- "text":"Ellensburg"
- },{
- "id":124,
- "text":"Monroe"
- }]
- }]
- }]';
- $json=json_decode($s, TRUE);
- echo '<pre>';print_r($json);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement