A function will be executed by a call to the function.

Syntax:

function functionName()
{
code to be executed;
}

sample code:

A simple function that writes my name when it is called:

<?php
function writeName()
{
echo “glenda deloso”;
}

echo “My name is “;
writeName();
?>