I was wondering, when you are putting html/javascript into your php code, Is it better to use
echo" html/javascript code";
or is it better to have like
<? if blah blah blah blah { ?> Html/javascropt code <? } else { more php code ?>
or is it better to use an include statement and have it in a seperated doc
Timotheos
4:05 pm on Jul 15, 2004 (gmt 0)
I think it really just comes down to personal preference. So I go with your second example. If there's a lot of html/javascript then I get out of php. To my mind it looks cleaner and I don't have to worry about escaping all those special characters.