Pyramid in PHP Part IV
PHP Pyramid Part 4
<?php
$limit = 5;
for($i=0;$i<=$limit;$i++)
{
for($k=$i;$k>0;$k--)
{
echo "*";
}
echo "<br/>";
}
?>
Output: * ** *** **** *****
<?php
$limit = 5;
for($i=0;$i<=$limit;$i++)
{
for($k=$i;$k>0;$k--)
{
echo "*";
}
echo "<br/>";
}
?>
Output: * ** *** **** *****
by Qualitians · Published October 1, 2016 · Last modified July 23, 2024
by Qualitians · Published October 1, 2016 · Last modified July 23, 2024
by Qualitians · Published October 1, 2016 · Last modified July 23, 2024