Virtual Open Schooling Online courses available at Virtual Open Schooling (VOS), for more details kindly click here!
NIOS Silver Jubilee Year
NIOS

PHP Functions

From NIOS
Jump to: navigation, search
Previous Page Home Page Next Page
ICT Applications

PHP allows organizing script by the use of functions. A function is defined using the keyword 'function',followed by the name of the function and an argument list inparenthesis. The body of the function is enclosed in curly brackets.For example:


function example($variable1,$variable2) {

echo "Example function\n" ;

return $retval ;

}


There is also a library of built-infunctions available. These give the ability to perform tasks suchas:

  • setting cookies
  • send mail
  • perform FTP operations
  • interface with the server's filesystem
  • interface with databases
  • execute other programs on the server
Previous Page Home Page Next Page
ICT Applications