//取得表头 $stamt1=$pdo->prepare("SHOW COLUMNS FROM shop"); $stamt1->execute(); while ($c1=$stamt1->fetch(PDO::FETCH_NUM)){ $list1[]=$c1; } var_dump($list1); //取得表头 echo "<table border=1>"; echo "<th>{$list1[0][0]}</th>"; echo "<th>{$list1[1][0]}</th>";
时间: 2024-10-12 17:27:07