1 回答

TA贡献2036条经验 获得超8个赞
这是你想要的吗?
<html>
<head>
<title>Try Session JSON</title>
</head>
<body>
<?php
$dbusername = "root";
$dbpassword = "";
$server = "localhost";
$dbconnect = mysqli_connect($server, $dbusername, $dbpassword);
$dbselect = mysqli_select_db($dbconnect, "test");
$sql="SELECT full_name FROM test.eattandance WHERE id=1";
$records=mysqli_query($dbconnect,$sql);
$json_array=array();
while($row=mysqli_fetch_assoc($records))
{
$json_array[]=$row;
echo $row['full_name'];
}
?>
</body>
</html>
- 1 回答
- 0 关注
- 147 浏览
添加回答
举报