function function_name(parameters separated by comma) {
 // Code
}







<?php
   function Message()
   {
      echo("Hello");
   }
   
   Message();
?>









<?php
   function Message($name)
   {
      echo("Hello ".$name);
   }
   
   Message("Gyan");
?>









<?php
   function Message($name="Gyan")
   {
      echo("Hello ".$name);
   }
   
   Message();
?>









<?php
   function Sum($num1, $num2)
   {
      return $num1 + $num2;
   }
   
   echo(Sum(1,2));
?>





Posted By  -  Karan Gupta
 
Posted On  -  Saturday, November 01, 2014

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250