How to write function in PHP
Function are the piece of code that can be used repeatedly in program.It can take input in the form of parameter and can be called anywhere in your program.
//To show how to use function in php.
echo "Name of pet is:";
/*Output of the above program is:
Name of pet is:Tommy
Name of pet is:puppy
Name of pet is:tiger