How can I repeatedly output content horizontally?
飞天传媒--招牌 网站 婚庆 显示屏
飞天传媒--招牌 网站 婚庆 显示屏 2017-12-14 07:49:05
0
3
1055

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

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

reply all(1)
电动小老虎

方法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 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 &lt;table width="100%" border="0" cellspacing="0" cellpadding="0" class="box"&gt; &lt;tr&gt; &lt;td&gt;&lt;ul&gt; [e:loop={30,10,0,0}] &lt;table width="100%" border="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td width="8" height="19"&gt;&lt;img src="[!--news.url--]skin/default/images/dd1.gif" width="5" height="5 " /&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="&lt;?=$bqsr['titleurl']?&gt;" target="_blank"&gt; &lt;?=DoTitleFont($bqr[titlefont],esub($bqr[title],38))?&gt; &lt;/a&gt; |&lt;a href="&lt;?=$bqsr['titleurl']?&gt;" target="_blank"&gt; &lt;?=$bqr[sex]?&gt; | &lt;?=$bqr[age]?&gt; | &lt;?=$bqr[education]?&gt; &lt;/a&gt; &lt;a href="&lt;?=$bqsr['titleurl']?&gt;"&gt;| &lt;?=$bqr[type]?&gt; &lt;/a&gt;&lt;/td&gt; &lt;td align="right"&gt;&lt;span class="STYLE11"&gt; &lt;?=date('m-d',$bqr[newstime])?&gt; &lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="2" colspan="3" background="skin/default/images/hline.gif"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; [/e:loop] &lt;/ul&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;
  • reply Alas, once you figure out the html mixed writing method in the php file, you can get it done. .
    电动小老虎 author 2017-12-17 23:05:19
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template