<?php
$mysqli = new mysqli('localhost','root','','le');
$result = $mysqli->query('SHOW TABLES');//执行查询语句
//输出此数据库中表结构
$tables = array();
while($arr = $result->fetch_assoc()){
//编辑查询结果
$tables[] = $arr;
}
echo '<br/>';
//通过字段名获取数据表结构
$result = $mysqli->query('DESCRIBE users');
$column[] = $arr;
while($arr = $result->fetch_assoc()){
$column[] = $arr;
}
var_dump($column);