Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Function with default parameters

Tue Oct 28, 2008 1:53 pm

Code:

  <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>




Post a reply
  Related Posts  to : Function with default parameters
 Use the 'default' case     -  
 String type default value     -  
 Assign default property value     -  
 Default Initial Values in java     -  
 How to change the default order on forums from ascending to     -  
 Default Expire time for Session JAVA     -  
 Remove default window icon from JFrame     -  
 Change letters to upper case by default     -  
 Change the default underline style of link     -  
 Encoding parameters in URL     -  

Topic Tags

PHP Functions