Functions with return values_PHP Tutorial

WBOY
Release: 2016-07-13 17:25:56
Original
822 people have browsed it



Function with return value




function makeBold($inputText)//Define function makeBold() function
{
$boldedText = "";
$boldedText .= $inputText;
$boldedText .= "
";
return($boldedText);//Return variable $boldedText
}
print("This line is not emphasized!!!
");//Print the string directly
print(makeBold("This line is emphasized!!!") . "
");//Call function makeBold() function
print("This line is not aggravated!!!
");//Print the string directly
?>



www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532021.htmlTechArticleFunction function with return value makeBold($inputText)//Define function makeBold() function { $boldedText = ; $boldedText .= $inputText; $boldedText .= ; return($boldedText);//Return variable...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!