php program to print triangle pattern
php program to print triangle pattern
php program to print triangle pattern
Example :-
<?php
//Star Pyramid Size
$size = 7;
for($i=1;$i<=$size;$i++){
for($j=1;$j<=$size-$i;$j++)
{
echo " ";
}
for($k=1;$k<=$i;$k++){
echo "* ";
}
echo "<br />";
}
?>
php program to print triangle pattern
Output:-
Related Post :-
Post a Comment