这是我的代码,输出有问题的那句我标注了。
$conn = mysqli_connect("localhost:3306", "root", "19961120");
if($conn){
mysqli_select_db($conn, "test");
$result = mysqli_query($conn, "select * from user");
$users = array();
for($i=0;$i
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
好好看看文档,json_decode() 是解析json字符串的,json_encode()才是把数组解析成json字符串