How to decode json file in php? -
i want data json. json file
[[["test demo","",,,0]],,"vi",,,,0.58984375,,[["vi"],,[0.58984375]]]
i want data "test demo" create code
$html = file_get_contents("jasonfile"); $obj1 = json_decode($html, true); echo $obj1[][][];
but not working. doing wrong please me on this..
json not valid, doesn't allow several commas in row. changing to:
[[["test demo","",0]],"vi",0.58984375,[["vi"],[0.58984375]]]
and running:
$obj1 = json_decode(...yourinput...); echo $obj1[0][0][0];
correctly outputs test demo
.
Comments
Post a Comment