Home > Backend Development > PHP Tutorial > smarty表格换行实例_PHP

smarty表格换行实例_PHP

WBOY
Release: 2016-05-31 18:15:25
Original
826 people have browsed it

本文实例讲述了smarty表格换行的实现方法。分享给大家供大家参考。具体分析如下:

在foreach中加入 key=count

代码如下:

 
 

   
   
   
 
 

每行放置三个 后换行 你喜欢换多少就改改参数就可以了!

代码如下:

 
 
     
 
 
 

另一种利用 cycle 來做换行的例子,但只能作到每行两条数据就换行的效果 只能换两行

代码如下:

 
   
     
"}>   
 

     
,

希望本文所述对大家的PHP程序设计有所帮助。
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