Home  >  Article  >  Backend Development  >  php 自动换行,该怎么解决

php 自动换行,该怎么解决

WBOY
WBOYOriginal
2016-06-13 10:33:441158browse

php 自动换行
请问怎么实现?

php 读取数据库 9 个栏目 
每三个加一个换行
 




------解决方案--------------------
if($key%3==0){
echo "
";
}
------解决方案--------------------
我猜是这个……

PHP code
$sql  = "select * from xxx";$rowSet = $db->query( $sql );foreach( $rowSet as $key => $row):     if( $key && !($ke%3)) echo "<br>";      echo $row->yyy;endforeach;<div class="clear">
                 
              
              
        
            </div>
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