in my d3js example contain [ symbol after children key & working perfectly
{"name": "root",
"children": [
{"name": "typeA(1095)",
"children": [
{"name": "2010(365)",
"children": [
{"name": "january(31)", "value": 31},
http://bl.ocks.org/mbostock/1283663
https://gist.github.com/mbostock/1283663/raw/a05a94858375bd0ae023f6950a2b13fac5127637/readme.json
but i convert a multi-dimensional array using php json_encode there is no [ symbol so when i pass it to d3js example it's not working
$json = array('name'=>'p_date','children'=>array('name'=>'HedCET','value'=>10));
json_encode($json) output
{"name":"p_date","children":{"name":"HedCET","value":10}}
there is no [ symbol after children key, is there any additional option to enable [ symbol in php json_encode ?
OR is there any difference between d3js json file and php json file ?
JSON_FORCE_OBJECTas an option tojson_encode?