Anonymous

What Is The Code For Printing A Pyramid Of Stars(center Align) In PHP?

2

2 Answers

Anonymous Profile
Anonymous answered
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>

Answer Question

Anonymous