PHP Functions

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 :



Function with one parameter

Function with parameter with default value