How to make the number triangle-2 in PHP

How to make the number triangle-2 in PHP

In this post we will give you information about How to make the number triangle-2 in PHP. Hear we will give you detail about How to make the number triangle-2 in PHPAnd how to use it also give you demo for it if it is necessary.

How to make the number triangle-2 in PHP

There are number of program for triangle pattern in php.

It depends on you which type of triangle you want to draw, always remember the loop iteration pattern. First for loop always indicate the number of rows.

I always use ‘for loop’ for this type of program

Program 1

<!--?php
<?php
for($i=0;$i<=7;$i++){
for($j=1;$j<=$i;$j++){
echo$i;
}
echo"<br>";
} ?>


Program 2

<?php
for($i=0;$i<=7;$i++){
for($j=1;$j<=$i;$j++){
echo"1";
}
echo"<br>";
} ?>

Label :

PHP

How to draw shapes in PHP

How to draw triangle in PHP

Program

Hope this code and post will helped you for implement How to make the number triangle-2 in PHP. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

6  +  4  =  

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US