Home  >  Article  >  Backend Development  >  echo循环输出数据库内容表格 怎么书写

echo循环输出数据库内容表格 怎么书写

WBOY
WBOYOriginal
2016-06-13 12:17:481305browse

echo循环输出数据库内容表格 如何书写
   
  $link=mysql_connect("localhost", "root","");
  $db  = mysql_select_db("ms_qua");
  $sql = "SELECT * FROM qua";
  $result = mysql_query($sql);    
  ?>  
  


表名:厂家资质信息


  

  
  
  
  
  
  
  
  
  
  
 
  while($row = mysql_fetch_array($result))
  {
  echo 
  }

?>
序号 部门 岗位 姓名 身份证号码 合同签订时间 证书名称 发证单位 证书编号 发证日期


如何echo输出表格 获取数据库内容?
------解决思路----------------------
while($row = mysql_fetch_row($result))<br />{<br />  echo '<tr>';<br />  foreach($row as $v) echo "<td>$v</td>";<br />  echo '</tr>';<br />}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn