ad

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