Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2001
    Location
    New Zealand
    Posts
    28

    Question php & html embedding question

    What is considered better/more efficient practice, to embed php in html or to embed html in php?

    eg:
    Embed php in html
    Code:
    <b><?=$varname?></b><br>
    OR
    Embed html in php
    Code:
    <?php 
    <b>$varname</b><br>
    ?>
    Last edited by xor; 09-23-2002 at 06:00 AM.
    The New Zealand Site
    http://www.thenewzealandsite.com

  2. #2
    Join Date
    Apr 2001
    Location
    Depok, Indonesia
    Posts
    988
    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.

  3. #3
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    Personally I don't ever use the first one but that's just personal preference I guess.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •