gpt4 book ai didi

php - 在 PHP/HTML 中输出 MySQL 表值的列表

转载 作者:行者123 更新时间:2023-11-29 14:56:00 26 4
gpt4 key购买 nike

我有一个 MySQL 列表,其中包含几个类别和很多数据行。我想简单地以 PHP/HTML 输出它。我该怎么做?

最佳答案

<?php 
$query = "SELECT * FROM TABLE";

$res = mysql_query($query,$connection);

while($row = mysql_fetch_array($res)) {

print_r($row);

}
?>

关于php - 在 PHP/HTML 中输出 MySQL 表值的列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4631622/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com