PHP best practice

Soldato
Joined
25 Oct 2006
Posts
5,395
What's the best way to output well indented HTML from PHP?

I considered using the HEREDOC syntax, but that makes the indented PHP source look just as bad.
 
Yep, I used to spend ages making sure that my HTML code looked tidy when being output by PHP.

With Firebug etc. I don't see the point anymore - there is very few times I just 'view source' now when looking for a problem.
 
Yep, I used to spend ages making sure that my HTML code looked tidy when being output by PHP.

With Firebug etc. I don't see the point anymore - there is very few times I just 'view source' now when looking for a problem.

I agree. However this is assessed work, so I want to make it look as neat as possible :)
 
I use to always try and make it look as tidy as possible and to remove as many blank spaces as possible but it the end it's all just seems pointless when you think about it. I think I mainly did to try and reduce the size of the data which was probably the only best reason.
 
Back
Top Bottom