如何获取表头,如何获取表头,如何获取表头,!!

//取得表头
$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>";

 

posted on 2016-07-24 10:04  hgfs瑞  阅读(431)  评论(0编辑  收藏  举报

导航