输出结果: This is test 例2 php函数参数默"/>
PHP头条
热点:

php指定函数参数默认值示例代码


例1

代码如下:


php函数指定默认值-www.jbxue.com


function printMe($param = NULL)
{
print $param;
}
printMe("This is test");
printMe();
?>



输出结果:
This is test

例2 php函数参数默认值的使用范例,php函数参数中设置和使用默认值。

代码如下:


php函数参数默认值 - www.jbxue.com


function textonweb ($content, $fontsize=3){
echo "$content";
}
textonweb ("A
", 7);
textonweb ("AA.
");
textonweb ("AAA.
");
textonweb ("AAAA!
");
?>

www.phpzy.comtrue/phpyy/26473.htmlTechArticlephp指定函数参数默认值示例代码 例1 代码如下: php函数指定默认值-www.jbxue.com function printMe($param = NULL) { print $param; } printMe("This is test"); printMe(); ?> 输出结果: This is test 例2 php函数参数默...

相关文章

PHP之友评论

今天推荐