Introduction

Functions are an aspect of programming used to repeat commonly used algorithms (scripts) easily and quickly. Functions, may both receive data via parameters and also return data. However A function is not required to return data and/or receive data.


In PHP a function is declared with the key word function:

Code:
1 function functionName() {
2
3     //do something here
4
5 }


Page: 1 2 3 4 5
Tutorial posted by: Patrick Kelly, Thursday March 3, 2011