mysql数据库 GET json

function get(){

$con = con();

$query = "Select * from luxian";

$result = mysqli_query($con, $query);

$jarr = array();

while($rows=mysqli_fetch_array($result))

{

array_push($jarr,$rows);

}

close($con);

return json_encode($jarr);

}

你可能感兴趣的:(mysql数据库 GET json)