#native_company# #native_desc#
#native_cta#

PHP-HTML Templates: A New Working Relationship Page 3

By PHP Builder Staff
on April 3, 2002

The Idea

While designers might find it irritating to “copy-and-paste” large
portion of PHP codes in their HTML designs, they will have no
problem putting HTML-comments: “<!– This is a HTML comment line
–>” in their pages. If these designers could put HTML-comments at
the places where our PHP code would appear then I could provide scripts
to insert PHP codes in them! This idea is similar to template-driven
designs.
In the places where rows of data will be display dynamically (based on database records), we will get them to denote
them with “HTML-comment” tags : “<!–START_ROW–>” and “<!–END_ROW–>”.

TEMPLATE.html

      <table>
        <tr>
          <td> <b>Name </b></td>
          <td> <b>Address</b></td>
        </tr>    
        
        <!--START_ROW-->
        <tr>
          <td> <!--NAME-DATA--> </td>
          <td> <!--ADDRESS-DATA--> </td>
        </tr>    
        <!--END_ROW-->
        
      </table>