我正在從一個mysql表打印數據到我的網頁上的一個表。這裏是代碼表數據只顯示第一個字母的條目
Print "<table border cellpadding=5>";
Print "<tr><th>Name:</th> <th>Size:</th> <th>Depth:</th> <th>Boat Access:</th>
<th>All Sports:</th> <th>Public Beach:</th> <th>Fish Species:</th> <th>Comments:
</th></tr>";
while($info = mysql_fetch_array($data))
{
Print "<tr>";
Print " <td>".$info['member'] . "</td> ";
Print "<td>".$info['size'] . " </td>";
Print " <td>".$info['depth'] . "</td> ";
Print " <td>".$info['access'] . "</td> ";
Print " <td>".$info['sports'] . "</td> ";
Print " <td>".$info['beach'] . " </td>";
Print" <td>".$info['bluegill'] ." </td>";
Print " <td>".$info['comments'] . "</td> "; "</tr>";
}
Print "</table>";
它的工作方式很好,但我的問題是如何將多個值放在同一個表數據。我嘗試了幾種不同的方式,沒有任何工作。如果我把 $ info ['bluegill'] [海灘]它只輸入表中第一個條目的第一個字母。 有什麼建議嗎?
[**請不要在新代碼'mysql_ *'功能** ](http://bit.ly/phpmsql)。他們不再被維護[並且被正式棄用](http://j.mp/XqV7Lp)。看到[**紅框**](http://j.mp/Te9zIL)?學習[*準備的語句*](http://j.mp/T9hLWi),並使用[PDO](http://php.net/pdo)或[MySQLi](http://php.net/ mysqli) - [這篇文章](http://j.mp/QEx8IB)將幫助你決定哪個。 – Kermit
你在問如何回顯一個變量? – Pitchinnate