klenwell information services : PhpTemplateFunction

Revision [65]

This is an old revision of PhpTemplateFunction made by KlenwellAdmin on 2007-01-02 14:33:35.
 
I try to use the file below for all my supporting code libraries or includes.

I use a simple format for all my functions call DMR. Data (declare your variables), Manipulate (manipulate your data), Return (the output of the function). As simple and obvious as it seems, it took me a while before I came up with it and it has significantly helped me as a programmer.

This template also includes a testbed, a little space where you do quick-and-dirty test of your functions.

<?php

/***  DOCUMENTATION

    Klenwell PHP Include Template

    Last Update: Jan 2007
    Author: Tom at klenwell@gmail.com

    FUNCTIONS
        name()

  NOTES

______________________________________________________________________________*/



// name
/*____________________________________________________________________________*/
function name()
{
// *** DATA

    // Return


// *** MANIPULATE

// *** RETURN

} // end Fx
/*____________________________________________________________________________*/


// Testbed
/*____________________________________________________________________________*/

if ( 1 )
{
    // test function
}

/*____________________________________________________________________________*/

?>




CategoryPhp