A user-defined function declaration starts with the word function:
Syntax function functionName() { code to be executed; } <?php function writeMsg() { echo "Hello world!"; } writeMsg(); // call the function ?>
A user-defined function declaration starts with the word function:
Syntax function functionName() { code to be executed; } <?php function writeMsg() { echo "Hello world!"; } writeMsg(); // call the function ?>