How to make the number pyramid in PHP

How to make the number pyramid in PHP

In this program, I will let you know the simple process to draw number pyramid in PHP using for loop.

PHP for loop execute a block of code for specified number of times.

Using for or foreach loop to draw/make number pyramid is much easier.

I am using for loop to draw/make number pyramid because of it is easier to understand that how many rows i have to iterate.

Number Pyramid
  1. for($i=0;$i<=9;$i++){
  2. for ($d=10-$i; $d > 0; $d--) {
  3. echo "&nbsp;&nbsp;";
  4. }
  5. for($j=1;$j<=$i;$j++){
  6. echo "&nbsp;".$i."&nbsp;";
  7. }
  8. echo "<br>";
  9. }

Phone: (+91) 8800417876
Noida, 201301
sakarya escort akyazı escort arifiye escort erenler escort eve gelen escort ferizli escort geyve escort hendek escort otele gelen escort sapanca escort söğütlü escort taraklı escort
sakarya escort akyazı escort arifiye escort erenler escort eve gelen escort ferizli escort geyve escort hendek escort karapürçek escort karasu escort kaynarca escort kocaali escort otele gelen escort pamukova escort sapanca escort söğütlü escort taraklı escort
sakarya escort akyazı escort arifiye escort erenler escort eve gelen escort ferizli escort geyve escort hendek escort karapürçek escort karasu escort kaynarca escort kocaali escort otele gelen escort pamukova escort sapanca escort söğütlü escort taraklı escort
sakarya escort akyazı escort arifiye escort erenler escort eve gelen escort ferizli escort geyve escort hendek escort karapürçek escort karasu escort kaynarca escort kocaali escort otele gelen escort pamukova escort sapanca escort söğütlü escort taraklı escort
sakarya escort serdivan escort adapazarı escort sakarya escort bayan sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sapanca escort sakarya escort