Code Organization: PHP Calcs Before HTML?
Okay so I am having problems organizing my PHP and HTML code. I realize that to include variables and whatnot one will have to insert some PHP code into the body of the HTML but I was curious: does anyone here insert the MySQL queries and other calculations before most of their HTML code?
It's just becoming a bit of a nightmare when I'm using echo for most of my HTML and I'm wondering if I should have most of my HTML hard-coded in there and just insert the smaller parts of the PHP code (while leaving as much as possible of the PHP code at the beginning.
Would love to hear some of your habits.