📜  从 mysqli php 返回多行并编码 JSON - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:23.797000             🧑  作者: Mango

代码示例1
 $news_id, 'image_url' => $image_url, 'news_title' => $news_title, 'news_description' => $news_description, 'news_article' => $news_article); 


          } while ($rows = mysqli_fetch_assoc($statement));

        mysqli_free_result($statement);
        echo json_encode($result);
    }
}
?>