DECLARING and CALLING a Function

Chapter 7 #134 - Martha's CIS 52

ASSIGNMENT/EXPLANATION

Functions are defined by using the function statement; the name of the function follows the function statement, and preceds a pair of parentheses, inside of which are the parameters, in a comma-separated list. "These variables will be filled by the values passed to your function." (133) "The naming rules for functions are similar to the naming rules for variables..." (134) The parentheses are required even if there are no parameters. This example is one such case - no parameters are required, so the parentheses are left empty.

Exercise

HELLO!

CODE

<?php 
function bighello() {
echo "<h1>HELLO!<h1>";
}
bighello();
?>