PHP Pyramid Part X
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($j=$limit;$j>$i;$j--) { echo " "; } for($k=$i;$k>0;$k--) { echo "*"; } echo "<br/>"; } ?>
Output: * ** *** **** *****
Published · Updated
<?php $limit = 5; for($i=0;$i<=$limit;$i++) { for($j=$limit;$j>$i;$j--) { echo " "; } 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