显示每列中的每个数字 [英] Display each number in each column

查看:99
本文介绍了显示每列中的每个数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮我这个。



根据下图:我有7列10行。

For每个框例如TS编号1,该框中唯一的编号应为0,依此类推。这取决于将要传递的价值



这是我的代码产生的输出

点击此图片







输出应该是这样的..



请点击此图





TIA伙计..



我的尝试:



Can anyone guys help me with this.

Base on the picture below: I have 7 columns and 10 rows.
For each box for example TS Number 1, the only number should be in that box is 0 and so on. It depends on the value that will be pass

Here's the output my code produce
Click this picture



The output should be like this..

Please click this picture


TIA Guys..

What I have tried:

$x=1;
$y=0;
$rows = 10; // define number of rows
$cols = 7;// define number of columns 
for($tr=1;$tr<=$rows;$tr++){

echo '<div class="calendar__week">';
for($td=1;$td<=$cols;$td++){ 
echo '<div class="calendar__day day">TS NUMBER: '. $x;                          
echo '<br><br>';
echo '<c style="color:green; font-size:30px;">';

while($y<$ts_qty){   //$ts_qty will hold the value that has been pass
echo $y;                    

$y++;
}                           
echo '</c></div>';  

$x++;
}               

echo '</div>';

}

推荐答案

x = 1;


y = 0;


rows = 10; //定义行数
rows = 10; // define number of rows


这篇关于显示每列中的每个数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆