首页
印 像 新 闻 系 统
网站首页 公告信息 编程实例 PHP函数 摄影无界 全景展示 我的作品 意见专栏
 

PHP有默认参数的函数

【2006年01月01日 22:28:12】 【阅读:次】 【字体:大 中 小 默认】 【背景:#换背景 #换背景 #换背景 #换背景 #换背景 #换背景 #换背景 默认】
<?
 function printColored($Text, $Color="black")  //定义function函数
 {
  print("<FONT COLOR=\"$Color\">$Text</FONT>"); //获取字符串的内容和颜色
 }
 printColored("这是黑颜色的字!");   //调用function函数
 print("<BR><BR>\n");
 printColored("这是蓝颜色的字!", "blue");   //调用function函数
 print("<BR>\n");
?>

(『印像空间』 【本文来源:『学习笔记』】 【作者:未知】 【录入:留印】)
限200字,剩余 字
关 键 字:
    
搜索条件: