$sth = mysqli_query("SELECT ...");$rows = array();while($r = mysqli_fetch_assoc($sth)) { $rows[] = $r;}print json_enpre($rows);函数
json_enpre需要PHP> = 5.2和 PHP-JSON
包-如所提到的在这里
注意 :
mysql自PHP
5.5.0起已弃用,请改用
mysqli扩展名http://php.net/manual/en/migration55.deprecated.php。



