Unknown
PHP functions are similar to other programming languages. A function is a piece of code which takes one more input in the form of parameter and does some processing and returns a value.
Types of Function in PHP
Pre-defined functions
User defined functions
What is Pre Defined Function :
Predefined functions are the inbuilt functions of php. These functions can be subdivided into multiple categories as stated below. string functions. numeric functions. date and time functions
Example
print_r() , array() , include() , explode() ETC
What is User defined functions :
User can define functions as per our requirements These are called 'User Defined Function'.
Syntex :
function keyword function_name(arg1,arg1,arg1) {
//block of statement
return value;
}
Example :
.function sum($a,$b) {
return $a+$b;
}