Home of web learners


You want to do some things which you don't find in builtin function and also can not change them,so what to do?

You can make function of your own,you can make as you want and can use like built in function,but very effective and user defined way

Lets start with a basic user defined function

function greetings(){
echo "Hello guest!"


Hello guest!

Here,we create a simple user defined function,when we call the function it shows Hello guest

For creating user defined function,you have to start with function keyword then name of your function and inside { there is your body of function which going to be execute when called

Here we use simple echo output,you can use a bunch of code in your function body and when you call this function any place inside your same script,this task inside your function body going to be execute

Call to function is very easy,just call the name you use in your assigned function name


About webn3rd