function php code example
Example 1: function php
function functionName() {
//code to be executed;
}
Example 2: how to define function in php
<?php
function writeMsg() {
echo "Hello world!";
}
writeMsg(); //call the function
?>
function functionName() {
//code to be executed;
}
<?php
function writeMsg() {
echo "Hello world!";
}
writeMsg(); //call the function
?>