> -----Original Message-----
> From: Jason Giangrande [mailto:[EMAIL PROTECTED]

> I'm looking for an easy way to write all my HTML using PHP.

Jason,

Sorry this is late and not even sure if you found your answer to this
question that you ask, however I think in the end it's going to be up to you
on how you do this as with anything, but the one thing that I do and prefer
is to include() my html with include files and ontop of that I have them in
functions so that like my header.php include page will allow me to change
the "title of the page", "the page topic" and some other functions specific
to my website. I find this way to be very convenient also for updates, I no
longer have to change all the files, I can update one template file and they
are all changed whenever that particular include is used. It's nice.

NOW!!  With that said, The one other thing I could suggest that I didn't see
anyone else mention, as you thought it was confusing to jump in and out of
html/php mode. Why not use heredoc?  I'm still new to php, so I'm not even
sure this is exactly what you wanted, but give it a look and see if this
would make your coding easier to follow? Just my 2 pennies!  :)

The manual doesn't have alot on this topic, heredoc is a string related
feature and can be found here...
http://us4.php.net/manual/en/language.types.string.php#language.types.string
.syntax.heredoc

If you google for "heredoc" or "here document" you'll find other pages of
reference. Like this gentleman even tested the speed difference from
echo/printing lines vs heredoc. Pretty interesting..
http://shat.net/php/notes/heredoc.php

Again not sure if this was what you where looking for but might just help
you since you don't have to use "print" statements and all html code can be
written inside and you can use variable interpolation. Heck you could even
use the include()(s) as well and place the heredoc in them for your
headers/footers/navigation/etc...

Good Luck,
Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to