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 " ";
for($b=2*$a-1; $b>0; $b--)
echo " 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 :-
Related Post :-
Post a Comment