Home Yellow Pages Movies Classifieds Jokes Jobs Free Hosting Videos

PHP Functions

Create a PHP Function

A function is a block of code that can be executed whenever we need it.

Creating PHP functions:

All functions start with the word "function()".

Name the function - It should be possible to understand what the function does by its name. The name can start with a letter or underscore (not a number).

Add a "{" - The function code starts after the opening curly brace

Insert the function code

Add a "}" - The function is finished by a closing curly brace.


A simple function that writes my name when it is called:

function writeMyName()
echo "Alice John";

Back to Home
BizHat.com   Bookmark   Astrology   Chat Room   Classifieds   Computer   Downloads   Directory   Dating   Domain Tools   Education   eCards   Finance   Forums   Freelance Work   Free Hosting   Free Mail   Gallery   Games   Guest Book   Greeting Cards   Ham Radio   Health   Home Business   Hosting Tutorials   Hosting Directory   India   Jobs   Jokes   Kerala   Matrimonial   Music   Movies   News   News Letter   Recipes   Real Estate   Search   SMS   Tourist Guide   Top 100 Sites   Vote Us   Yellow Pages   Arthunkal Church   Site Map