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

PHP有返回值的函数

【2006年01月01日 22:26:28】 【阅读:次】 【字体:大 中 小 默认】 【背景:#换背景 #换背景 #换背景 #换背景 #换背景 #换背景 #换背景 默认】
<?
 function makeBold($inputText)  //定义function makeBold()函数
 {
  $boldedText = "<B>";
  $boldedText .= $inputText;
  $boldedText .= "</B>";
  return($boldedText);  //返回变量$boldedText
 }
 print("这行没有加重!!!<BR>\n"); //直接打印字符串 
 print(makeBold("这行被加重了!!!") . "<BR>\n");//调用function makeBold()函数
 print("这行没有加重!!!<BR>\n"); //直接打印字符串
?>

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