Example 1
Copy the Code code as follows:
PHP functions Specify default values-www.jbxue.com
function printMe ($param = NULL)
{
Print $param;
}
PrintMe ("This is Test");
PrintMe ();
?>
Output Result:
This is test
Example 2 PHP function parameter default value of use example, PHP function parameters set and use the default value.
Copy the Code code as follows:
php function parameter default value-www.jbxue.com
function Textonweb ($content, $fontsize =3) {
echo "$content";
}
Textonweb ("A
", 7);
Textonweb ("AA.
");
Textonweb ("AAA.
");
Textonweb ("aaaa!
");
?>
http://www.bkjia.com/PHPjc/621702.html www.bkjia.com true http://www.bkjia.com/PHPjc/621702.html techarticle Example 1 copy the code code as follows: The HTML head titlephp function specifies the default value-www.jbxue.com/title/head body? PHP function printMe ($param = NULL) {print $p Aram; } printMe ("This is Test" ... )