This method is called a 'Here Doc', and emulated from the various shells (Bash,Ash,Korn,etc)...
I've never had a problem with either flavor:
Just make positive that the ending HTML has *no* spaces in front of it... If it does, then the Here Doc mechanism won't find it...
--Deb and I just butted heads on Hydro Thunder--