Welcome to PCCS-Linux.COM Hello, and welcome to the PCCS-Linux Home Page.
Your last visit was !!!
Your Browser is running on Other
 
Creating Functions
I attempt to create functions for code that I want to use throughout my application. For example I create a html_begin and a html_end function to take care of my HTML => header and footer

HEADER

<?
function html_Begin($title = "Default") {
global $col_bg,$col_link;
/* These variable are outside my function so I define the a global
variables */

        print
"<HTML><HEAD><TITLE>$_title</TITLE>";
        print "</HEAD>";
        print "<BODY bgcolor=\"$col_bg\" link=\"$col_link\
alink=\"$col_link\">";
        print "<TITLE>$_title</TITLE>";
}

// I would call the this function like this;
        html_Begin("Welcome TO PHP");
?>

FOOTER

<?
function html_End() {
        print "</BODY></HTML>";
}
// I would call the this function like this;
        html_End();
?>

>> Comments/FeedBack


Page hits 110 last request on :04:42



This web site is prepared and maintained by Chauncey Thorn.
The information contained in this site was valid at the time of posting.
Chauncey Thorn, assumes no liability for damages incurred directly or indirectly as a result of errors, omissions or discrepancies.

Remember most of the content here are my notes...

All logos and trademarks in this site are property of their respective owner. All the rest © by PCCS-Linux.COM

PCCS-Linux.COM ::ource Advocate Articles catalogue
2000 2002