我有以下代码,基本上似乎每次都覆盖相同的数组,所以输出(json)只给我返回的最后一行?
谢谢
$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);