PHP Programming Language

How Can Changing Argument value
Previous Home Next
<title>Changing Argument value</title>
// One optional argument: it must be last
function page_header5($color, $title, $header =
    print '<html><head><title>Hello Mr. ' . $title .
    print '<body bgcolor="#' . $color . '">';
    print "<h1>$header</h1>";
// Acceptable ways to call this function:
page_header5('0066FF','Hello Mr. harsh'); // uses 
default $header
page_header5('0066FF','Hello Mr. harsh','This is
very smart man!'); // no defaults


Previous Home Next