Skip to content
Advertisement

Generate a pyramid using PHP For Loop and HTML

I made a script where it creates a pyramid using a php for loop and html table elements, but the pyramid isn’t how I want it yet. The code:

JavaScript

Right now it looks like this: enter image description here

But I want it to look like this: enter image description here

Can someone help me with that?

Advertisement

Answer

Simply add cellspacing=0 to table

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement