User defined functions

In the example below we create the function sayhi (). The opening curly brace { indicates that this is the beginning of the function code, and } indicates the end. To call the function just write its name for example:

Function sayhi (){
Echo “Hello world!”;
}

sayhi();

//this calls the function

//then it will output onto the browser Hello world!