[原创]PHP转换数据库查询结果为json include \'db.php\'; $sql=\'select * from kw_projects\'; $result=mysql_query($sql); $results = array(); while ( $row = mysql_fetch_assoc( $result )) { $results = $row; } echo json_encode( $results PHP mikel 2014-03-13 101 热度 0评论