Firstly let us know What is the user defined function in php ?
This function declaration starts with the word "function" and user defined function name is not case-sensitive.
User defined function starts with a letter not a number.
Use of user defined function:
A function is a block of verbal expressions that can be used perpetually in a program.
In bellow example you can easily understand use of user defined function
<?php
function SendMsg() {
//create a user define function SendMsg()
echo "Hope you are doing well!";
//here echo your message
}
SendMsg(); // now call the function
?>
when you call the function then,
output will come following:
Hope you are doing well!
0 Comment(s)