PHP Function
Syntax
A function in PHP can be defined without parameters or a return value, simply to execute a block of code when called.
function functionName() { // Code to execute}
// Call functionfunctionName();Example
function sayHello() { echo "Hello World";}
sayHello();
//Output: Hello World