-2

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

2
Contributors
1
Reply
21
Views
2 Years
Discussion Span
Last Post by jkon
0

It seems from your code that you don't know much about functional programming either. So what is your question exactly ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.