search

Home  >  Q&A  >  body text

How can I repeatedly output content horizontally?

How to output content horizontally and repeatedly? The ratio is in the form of 4 columns and 5 rows

飞天传媒--招牌 网站 婚庆 显示屏飞天传媒--招牌 网站 婚庆 显示屏2623 days ago1075

reply all(3)I'll reply

  • 电动小老虎

    电动小老虎2017-12-17 12:32:43

    方法1  table>tr*5>td{$}*4

    方法2

    <?php 

    echo "<table border='1px solid' cellspacing ='0' cellpadding ='10' bgcolor='skyblue'>";

    for ($i=0; $i < 5; $i++) { 

                echo "<tr>";

                     for ($j=0; $j < 4; $j++)

                         { 

                         echo "<td>".$j."</td>";

                         }

                echo "</tr>";

    }

    echo "</table>" ;

     ?>


    reply
    0
  • 飞天传媒--招牌 网站 婚庆 显示屏

    I tested it, but it didn’t work out and it can’t be displayed. I want the recommended talent output to be 5 columns x 4 rows. The source code of Empire CMS is as follows <table width="100%" border="0" cellspacing="0" cellpadding="0" class="box"> <tr> <td><ul> [e:loop={30,10,0,0}] <table width="100%" border="0" cellspacing="0"> <tr> <td width="8" height="19"><img src="[!--news.url--]skin/default/images/dd1.gif" width="5" height="5 " /></td> <td><a href="<?=$bqsr['titleurl']?>" target="_blank"> <?=DoTitleFont($bqr[titlefont],esub($bqr[title],38))?> </a> |<a href="<?=$bqsr['titleurl']?>" target="_blank"> <?=$bqr[sex]?> | <?=$bqr[age]?> | <?=$bqr[education]?> </a> <a href="<?=$bqsr['titleurl']?>">| <?=$bqr[type]?> </a></td> <td align="right"><span class="STYLE11"> <?=date('m-d',$bqr[newstime])?> </span></td> </tr> <tr> <td height="2" colspan="3" background="skin/default/images/hline.gif"></td> </tr> </table> [/e:loop] </ul></td> </tr> </table>

    飞天传媒--招牌 网站 婚庆 显示屏 · 2017-12-17 15:26:31
    电动小老虎

    Alas, once you figure out the html mixed writing method in the php file, you can get it done. .

    电动小老虎 · 2017-12-17 23:05:19
  • Cancelreply