Last active
August 29, 2015 14:24
-
-
Save developer-anuragsingh/638886875eb1d5a9baf5 to your computer and use it in GitHub Desktop.
Simple PHP program for beginners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$height = 3; | |
$extraStar = 1; | |
for($i=1; $i<=$height; $i++){ | |
for($j=$i; $j<=$height-1; $j++){ | |
echo " "; | |
} | |
for($k=1; $k<=$i; $k++){ | |
echo "*"; | |
} | |
for($l=$extraStar; $l>1; $l--){ | |
echo "*"; | |
} | |
echo "<br/>"; | |
$extraStar++; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment