PHPBuilder - PHP-HTML Templates: A New Working Relationship Page 3



RSS Twitter
Articles Html

PHP-HTML Templates: A New Working Relationship - Page 3

by: PHP Builder Staff
|
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>


« Previous Page
1
|
2
|
3
|
4
|
5
|
6
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:

Comment:



Comment:

(Maximum characters: 1200). You have characters left.