开发者

Write an application that will display the output below using 2 for loops in PHP [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or 开发者_运维百科rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

1

12

123

1234

12345

123456

1234567

12345678

123456789


for ($i = 1; $i <= 9; $i++) {
  for ($j = 1; $j <= $i; $j++) {
    echo $j;
  }
  echo "\n";
}


Is that so hard?

<?php

for($i=1;$i<10;$i++)
{
    for($j=1;$j<=$i;$j++)
        echo $j;
    echo '<br/>';
}

?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜