Php 表数据仅显示条目的第一个字母
我正在将mysql表中的数据打印到网页上的表中。这是密码Php 表数据仅显示条目的第一个字母,php,html-table,Php,Html Table,我正在将mysql表中的数据打印到网页上的表中。这是密码 Print "<table border cellpadding=5>"; Print "<tr><th>Name:</th> <th>Size:</th> <th>Depth:</th> <th>Boat Access:</th> <th>All Sports:<
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>";
Print”“;
打印“名称:尺寸:深度:船通道:
所有运动项目:公共海滩:鱼类种类:评论:
";
而($info=mysql\u fetch\u数组($data))
{
打印“”;
打印“$info['member']”;
打印“$info['size']”;
打印“$info['depth']”;
打印“$info['access']”;
打印“$info['sports]”;
打印“$info['beach]”;
打印“$info['bluegill']”;
打印“$info['comments']”;
}
打印“”;
它的工作方式很好,但我的问题是如何在同一个表数据中放置多个值。我试过几种不同的方法,但都不管用。如果我说
$info['bluegill'][beach]它只在表中输入第一个条目的第一个字母。
有什么建议吗?像这样连接每个打印
Print " <td>". $info['member'] . $info['thing'] . "</td> ";
Print”“$信息['member']$信息['thing']。" ";
这将允许您在每个表框中回显额外的值。它们不再得到维护。看到了吗?相反,学习,并使用or-将帮助您决定哪一个。您是在问如何回显变量吗?非常感谢。我可以发誓我试过了,但我猜不是因为它现在起作用了。不客气。我在开始使用PHP时遇到了完全相同的问题:)