Friday, 6 February 2015

Functions

As we know that php has its own built in function like other programming languages ,similarly in php we can build own functions, syntax for user defined function as below:



<?php
// define custom function function myfunction() {
   
       ...... // your code  }
//call a function
myfunction();
?>


Example:


<?php
/ define custom function
function myfunction() {
   
    echo"myfunction value";

   
}
//call a function

myfunction();

// print output myfunction value
?>



No comments: