It depends on the book. The book I got template and class information from was PHP Advanced for the World Wide Web written by Larry Ullman and published by Peachpit Press.
It's a matter of preference. PHP is, of course, written to enable programmers to mix code with Html. Obviously, there's nothing the matter with mixing PHP and Html.
He still needs to, in my opinion, break the code down and test it in pieces.