How to make the number triangle pattern 1 in php

How to make the number triangle pattern 1 in php

In this post we will give you information about How to make the number triangle pattern 1 in php. Hear we will give you detail about How to make the number triangle pattern 1 in phpAnd how to use it also give you demo for it if it is necessary.

Program to display how to make the number triangle pattern 1 in php using for loop.
For or Foreach loop makes program easy to iterate over number of rows.

  1. $k=1;
  2. for($i=;$i<5;$i++){
  3.     for($j=1;$j<=$i;$j++){
  4.         echo$k."&nbsp;";
  5.         $k++;
  6.     }
  7.     echo"<br>";
  8. }
$k=1;

for($i=0;$i<5;$i++){

	for($j=1;$j<=$i;$j++){
		echo $k."&nbsp;";
		$k++;
	}
	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 pattern 1 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 *

44  +    =  49

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