PHP Programming Language

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

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: