A function can be defined using the following syntax
function foo ($arg_1, $arg_2, ..., $arg_n) {
echo "Example function.";
return $retval;
}
Any valid PHP code can appear in a function, even other function or class definitions.
Functions must be defined before they are referenced.