Showing posts with label Adding parameters. Show all posts
Showing posts with label Adding parameters. Show all posts

Tuesday, January 28, 2014

PHP Functions


To keep the script from being executed when the page loads, you can put it into a function.
A function will be executed by a call to the function. You may call a function from anywhere within a page.

Create a PHP Function

A function will be executed by a call to the function.

Syntax

function functionName()
{
code to be executed;
}
PHP function guidelines:
  • Give the function a name that reflects what the function does
  • The function name can start with a letter or underscore (not a number)