In this case, html js php loop control is used, knowledge related to logical judgment:
When reviewing the loop control language and for loop printing pyramid today, The displayed pyramid is always screwed up in the browser, and Firefox, IE, and Chrome display incorrectly. After checking, I think it should be a problem with the character set, but after modifying the character set, it still doesn’t work
Yes, it was later discovered that the utf-8 font space problem occupies two characters of space, the following are the replacement methods of some spaces I collected:
character width)
half blank (1 character width)
one blank (2 character width)
narrow blank (less than 1 character width)
?
You can use a name or number as a substitute for a space, the name must be lowercase, and the “;” at the end cannot be omitted.
Click me to view the case