Forums / Cotonti / Development / Help request :: JSON

JSON notation

ez
#24010 2010-04-08 02:11
I have figured it out... For the developers, here's the answer:

	// query return to JSON
	$tmpjson="";
	while($irow = sed_sql_fetchassoc($isql)) {
		$tmpjson .= '"id'.$irow['ci_id'].'":'.json_encode($irow).',';
	}
	$tmpjson="{".substr($tmpjson,0,-1)."}";

The following part: '"id'.$irow['ci_id'] You must decide yourself how it is named
for me idxxx where xxx is a unique rowid was usefull.


I find JSON an effective way to transfer data from AJAX requests.
with JSON you can process complex structures quickly into your screen :)

Hope more developers will use it !

Have FUN
==- I say: Keep it EZ -==