answered 9/3/2009 What Is The Code For Printing A Pyramid Of Stars(center Align) In PHP? Sorry, I can't get this to format right, but try this: <div align="center"> <?php for($I = 1; $I < 10; $I++){ for ($stars = 1; $stars <= $I; $stars++) { echo '*'; } echo '<br>';} ?> </div>