Is this a correct json format....

Posted by chandru_cp on Stack Overflow See other posts from Stack Overflow or by chandru_cp
Published on 2010-03-12T09:24:44Z Indexed on 2010/03/12 9:27 UTC
Read the original article Hit count: 194

Filed under:
|

I want to get a fair idea about json format... I am using php in which i have converted my result array to json like this

$result = mysql_query("select dStud_id,dMarkObtained1,dMarkObtained2,
                dMarkObtained3,dMarkTotal from tbl_internalmarkallot");
$JsonVar = json_encode($res);

echo "<input type='text' name='json' id='json' value ='$JsonVar'>";

And the text box shows

{"0":"101","dStud_id":"101","1":"60","dMarkObtained1":"60","2":"80", "dMarkObtained2":"80","3":"80","dMarkObtained3":"80","4":"220","dMarkTotal":"220"}

Is this a correct json format....

© Stack Overflow or respective owner

Related posts about JSON

Related posts about php