HubFirms

HubFirms : Blog -How To Create Triangle In PHP

How To Create Triangle In PHP

How To Create Triangle In PHP

The most effective method to make triangle in php, This is a typical inquiry for learner and transitional level programmer.I will share content which will create triangle utilizing php, this is regular sort question in meet. The programming dialects can be fluctuate however question will same how to produce triangle. 

 

Top 10 Frameworks That Are Ruling the PHP Development Services in 2019

Test Code In Php To Generate Right Angle: 

The Below php code will use to make right point from 1-10.

/* right tringle */  
for ($i=0; $i<=10; $i++) {  
 for($j=1; $j<=$i; $j++) {  
	echo $i ."  ";  
  } 
echo "<br>\n";
}

PHP Star Triangle Program Example
The below code are creating right angle using star(*).

for($i=0;$i<=10;$i++){  
for($j=1;$j<=$i;$j++){  
echo "* ";  
}  
echo "<br>";  
}

 

Java for iOS? Gluon Client plugins support Java & JavaFX on iOS devices

PHP Number Triangle Program In PHP
The Below php code will use to create Triangle from 1- 10.

for ($i=9; $i>=1; $i--) {  
  for($j=1; $j<=$i; $j++) {  
     echo '&nbsp;';  
  }
  $j--;
for ($k=1; $k<=(10-$j); $k++) {  
    echo " # ";   
}  
echo "<br>\n";
}
Java vs Python – What’s better for your project?

 


Author Biography.

Hub Firms
Hub Firms

HubFirms is one of the world’s largest online publications that delivers an international perspective on the latest news about Internet technology, business and culture.


Related Posts