Mega Code Archive

 
Categories / Php / Functions
 

Changing argument values

<? // One optional argument: it must be last function page_header5($color, $title, $header = 'Welcome') {     print '<html><head><title>Welcome to ' . $title . '</title></head>';     print '<body bgcolor="#' . $color . '">';     print "<h1>$header</h1>"; } // Acceptable ways to call this function: page_header5('66cc99','my wonderful page'); // uses default $header page_header5('66cc99','my wonderful page','This page is great!'); // no defaults ?>