Hello Everybody,
Today I will discuss about the user defined function of PHP.Basically there are two catagories of PHP function one is built in function and another is user defined function.PHP has about 1000 built in function that we can use when we make any application.on the other hand any user can make his/her own funcion for their reliable use according to some prescribed rules.This is called user defined function.
For create such user defined function we first follow the following rules:
Function functionName(arguments){
statements
}
functionName();
Lets see an example step by step-1:
Function [here Function is the keyword that must be called]
step-2
Function newFunction()
//after the keyword we will declare the function name,here i declare newFunction(),you can declared any one
step-3
Function newFunction(){
echo "Hello Everybody";}
//in this {}area I write an statement that will show in output
step-4
newFunction();
//after the statement when we again call the function name then it will show the out put if we run it
My next discussion will be PHP function with argument
Thanks for watching
shuvo