PHP Programming Language

adplus-dvertising
How Can Changing Argument value
Previous Home Next
<html>
<head>
<title>Changing Argument value</title>
</head>
<body>
<?php
// One optional argument: it must be last
function page_header5($color, $title, $header =
'Hello')
   {
    print '<html><head><title>Hello Mr. ' . $title .
		'</title></head>';
    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
?>  
</body>
</html>

Output:

Previous Home Next