jquery - How to convert html contents to json using PHP? -
i tried save html contents json formatting...
http://jsfiddle.net/usernan/2gwmp/
when clicking on #save
button, html contents posted , storing json php.
[{ "container": [ { "type": "title", "data": 1, "active": true, "content": "content 1", "description": "description 1", "main": [ { "type": "sub", "content": "content 2", "description": "description 2" }, { "type": "sub", "content": "content 3", "description": null }, { "type": "title", "data": 2, "active": false, "content": "content 4", "description": null, "main": [ { "type": "sub", "content": "content 5", "description": "description 5" }, { "type": "sub", "content": "content 6", "description": "description 6" }, { "type": "title", "data": 3, "active": true, "content": "content 7", "description": null, "main": [ { "type": "sub", "content": "content 8", "description": null }, { "type": "sub", "content": "content 9", "description": null } ] } ] } ] }, { "type": "sub", "content": "content 10", "description": "description 10" }, { "type": "title", "data": 4, "active": false, "content": "content 11", "description": null, "main": [ { "type": "title", "data": 5, "active": false, "content": "content 12", "description": null, "main": [ { "type": "sub", "content": "content 13", "description": "description 13" } ] }, { "type": "sub", "content": "content 14", "description": null } ] } ] }]
i not know how coding php solve problem.
if take @ problem , share bit of science, i'd grateful. thanks!
Comments
Post a Comment