I have the following codewhich basically seems to be overwriting the same array each time so the output (json) only gives me the last row returned?
Thanks
$structure = mysql_query("SELECT FIELDNAME, DISPLAYNAME from `_PREFS_MAINGRID_`");
$rowsField = array();
while($struct = mysql_fetch_assoc($structure)) {
$rowsField["columname"] = $struct;
}
$plode = implode("` as `", $rowsField["columname"]);
print json_encode($rowsField);