Lets enjoy power of PHP Function


A set of specific program and source code which complete a specific task is function.
Function separates the complexity of a large program and provides a modular approach. There are two type of function user define function and library function. Now focus on user defines function and try to understand.
PHP Function

Syntex of PHP function :

function functionName()
code to be executed;

Complete Example of PHP Function

<!DOCTYPE html>
<html lang="en">
<title>IP Address</title>
<meta charset="utf-8" />
function crdt(){
return $dt;
echo crdt();