How to Print Triangle of Stars in PHP

Hi friend, hope you are doing good. In this tutorial, we will let you know how to print triangle of stars in PHP programming language.

Copy the below code and create a new PHP file and paste, after that execute that file with the help of PHP compiler to see the output.

*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *

Reverse order print star pattern

Below PHP program will print the star pattern in reverse order.

* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Solved Programs