Home  >  Article  >  Backend Development  >  Database query record php multi-row and multi-column display_PHP tutorial

Database query record php multi-row and multi-column display_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:45:11881browse

复制代码 代码如下:





数据库查询记录多行多列显示

require_once 'include/config.php';
$result=mysql_query("select * from guestbook");
$i=5;
$j=0;
?>



while($row=mysql_fetch_array($result))
{
$j++;
?>

if($j==$i)
{
$j=0;
echo "";
echo "";
}
}
for($k=$i-$j;$k>0;$k--)
{
echo "";
}
?>




www.bkjia.comtruehttp://www.bkjia.com/PHPjc/320374.htmlTechArticle复制代码 代码如下: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" html xmlns="http://www.w3.org/199...
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