繁体   English   中英

表数据仅显示第一个输入字母

[英]Table data only shows first letter of entry

我将数据从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'] [海滩],它只输入第一个条目的第一个字母进入表格。 有什么建议么?

像这样连接每个印刷品

Print " <td>". $info['member'] . $info['thing'] . "</td> ";

这将允许您在每个表格框中回显额外的值

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM