Function with default parameters
<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>
Related examples in the same category