Originally Posted by
jMerliN
I would typically not even recommend mixing HTML and PHP. The modern practice is to use PHP as a middleware layer (and technically a back-end since it talks to the database). Then your HTML uses jQuery or whatever you want to dynamically render content, and an ajax request to some php page like /posts.php?threadId=<tid> returns post data, and your JS renders it.
The former is unmaintainable, the latter is fairly common in professional practice. Further, if you try to use the former and sprinkle in ajax to "load more" instead of loading another page, you've implemented both, and why not just start with the better approach initially? :)