How To Make The Star Triangle In Php?

Write code that will print the following:
*
**
***
****
*****


for($i=0;$i<5;$i++)
{
for($j=0; $j<=$i ; $j++)
{
echo "*";
}
echo '<br>';
}

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *