PHP Functions

In this tutorial you will learn about the PHP Functions and its application with practical example.

PHP functions are block of code defined to perform a specific task. PHP functions are like other programming languages. A function is a block of code which can takes one more input in the form of arguments and perform some processing and may or may not returns a value.

Syntax for Creating function in PHP :

Example1:

Example2:

Function with one parameter

Example2:
Function with parameter with default value

 

In this tutorial we have learn about the PHP Functions and its application with practical example. I hope you will like this tutorial.