默认值 php函数参数默认值的使用范例
php函数参数默认值的使用范例 [代码片段(17行)]
<html>
<head>
<title> Printing text on a Web Page</title>
</head>
<body>
<?php
function textonweb ($content, $fontsize=3){
echo "<font SIZE=$fontsize>$content</font>";
}
textonweb ("A <br />", 7);
textonweb ("AA.<br />");
textonweb ("AAA. <br />");
textonweb ("AAAA! <br />");
?>
</body>
</html>
- 上一篇:数组 php利用数组实现无限极类别层次
- 下一篇:PHP编程风格规范分享
收藏文章
精彩图集
精彩文章






