| Posted by Jerry Stuckle on 08/16/06 00:55 
Chung Leong wrote:> Rik wrote:
 >
 >>--page.php------------
 >>include('head.html');
 >>/* generate content */
 >>include('foot.html');
 >>----------------------
 >
 >
 > Agh! Drives me crazy that people keep recommending this hamfisted
 > method. Doing includes in lieu of calling function is a poor way to
 > program. A page header or footer is not different from other
 > functionalities in your application. To reuse it, wrap it in a
 > function. Example:
 >
 
 Sorry, Chung, I agree with Rik on this one.  This is an excellent way to
 reuse the code.  I use various incarnations of this (either in PHP or
 using SSI) in a lot of code.
 
 It sure is a lot better than trying to keep everything in one page.
 
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
  Navigation: [Reply to this message] |