Saturday, June 1, 2024

php program print inverted Pyramid star pattern in php


php program print inverted Pyramid star pattern in php

 php program print inverted Pyramid star pattern in php

Example :-

<?php
echo "<pre>";
$n =10;
for($a=10; $a>0;$a--)
{
  for($b=$n-$a; $b>0; $b--)
  echo "&nbsp;&nbsp;";
for($b=2*$a-1; $b>0; $b--)
echo "&nbsp;1";
//change only  echo ""; value
    //for example :- 1,d,4,h,9,...etc
echo"<br>";
}
echo"</pre>";
?>

 php program print inverted Pyramid star pattern in php

Output :-

php program print inverted Pyramid star pattern in php


Related Post :-

php program palindrome number

php for loop

css border property

No comments:

Post a Comment

Learn Web Designing Step by Step with Web Designing Theory

Web Designing Theory – A Journey from Struggle to Web Development Success Sometimes students feel confused while learning coding and web d...