5

So one thing that kinda bugs me about php embedding is the white space formatting it creates when you break your project into templates or includes.

It has no affect on the front end at all but if you look at the source code, usually the top tag in a php template is spaced way off, unless you move your entire php code block all the way to the left. Then somehow it looks right on the frontend but now your php source code looks messy xD Could just be my code editor (ST3) but idk. Anybody else?

Comments
  • 1
    Back when I was doing PHP I kept two indent levels. One for HTML and one for PHP, so each one was correctly indented on its own part.
  • 1
    Run the resulting markup through an uglifier then a prettier prior to sending it to the client. Problem solved.
Add Comment