-2
我正在使用此代码向我连接到的数据库显示表的列表,但我无法将它们放入字符串中。 什么,我想发生是从数据库中获取表的列表,并将其存储在一个字符串在数据库中获取表并将其存储在字符串中
$result = mysql_query("show tables"); // run the query and assign the result to $result
while($table = mysql_fetch_array($result)) { // go through each row that was returned in $result
if ($table) {
$aw = array();
$count= 0;
$aw[$count] = $table[0];
echo $string = array($aw[$count]);
$count++;
}
}
谢谢,但我也想在CSV格式的数据 – VicGomez
那么只要看看编辑的答案。 – Ionic
我不明白如何产生CSV字符串的功能可以帮助我 – VicGomez