Home >php教程 >php手册 >有返回值的函数

有返回值的函数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:25:491473browse



有返回值的函数




function makeBold($inputText)//定义function makeBold()函数
{
$boldedText = "";
$boldedText .= $inputText;
$boldedText .= "
";
return($boldedText);//返回变量$boldedText
}
print("这行没有加重!!!
");//直接打印字符串
print(makeBold("这行被加重了!!!") . "
");//调用function makeBold()函数
print("这行没有加重!!!
");//直接打印字符串
?>



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn