Web Hosting Talk







View Full Version : php & html embedding question


xor
09-23-2002, 05:55 AM
What is considered better/more efficient practice, to embed php in html or to embed html in php?

eg:
Embed php in html

<b><?=$varname?></b><br>

OR
Embed html in php

<?php
<b>$varname</b><br>
?>

priyadi
09-23-2002, 10:12 AM
I don't think one is going to be significantly more efficient than the other. The ?> ending in PHP is more or less a print/echo command internally.

Rich2k
09-23-2002, 11:43 AM
Personally I don't ever use the first one but that's just personal preference I guess.