To define a function, use the following syntax:
function myFunc() { // (do stuff here) }
<?php function hello() { echo"Hello, world! \n"; }// w w w . j av a2 s . c o m // Displays"Hello, world!" hello(); ?>