-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