PHP Star Patterns Program

PHP Star Patterns Program

Note: Keep the following tips while trying star patterns using PHP.

  • Use <br> tag to insert new line.
  • Use HTML Entity &nbsp; to insert multiple spaces in a document because, in HTML, multiple whitespace characters are collapsed into one space.
Star Pattern 1
*
**
***
****
*****
Star Pattern 2
*****
****
***
**
*
Star Pattern 3
    *
   **
  ***
 ****
*****
Star Pattern 4
*****
 ****
  ***
   **
    *
Star Pattern 5
    *
   ***
  *****
 *******
*********
Star Pattern 6
*********
 *******
  *****
   ***
    *
Star Pattern 7
    *        
   * *      
  *   *    
 *     *  
*       *
Star Pattern 8
*       *
 *     *  
  *   *    
   * *      
    * 
Star Pattern 9
    *        
   * *      
  *   *    
 *     *  
*       *
 *     *  
  *   *    
   * *      
    * 
Star Pattern 10
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *
Star Pattern 11
**********
****  ****
***    ***
**      **
*        *
**      **
***    ***
****  ****
**********

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author