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

WBOY
Release: 2016-06-13 12:17:48
Original
1306 people have browsed it

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 />}
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!