php合并单元格

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php合并单元格相关的知识,希望对你有一定的参考价值。

<?php $sql=mysql_query("select count(*) as total from price group by company ",$conn);
$info=mysql_fetch_array($sql);
$total=$info[total];
if($total==0)

echo "本站暂无推荐产品!";

else
....我想让他输出时像这个表一样显示

你嵌入html语言不就可以了吗 ?
else
$sql = mysql_query("select * from price group by company ",$conn);

while($row = mysql_fetch_array($sql))

?><table><tr><td>产品名称</td><td>产品..</td></tr>
<tr><td><?php echo $row[\'产品名字\'];?></td><td><?php echo $row[\'产品..\'];?>
</td></tr>

</table>

<?php

参考技术A 你可以单独插入一下这样的表格 然后在循环显示不就实现了吗

以上是关于php合并单元格的主要内容,如果未能解决你的问题,请参考以下文章