Home » , » Functions in PHP

Functions in PHP

Written By Unknown on Kamis, 31 Desember 2009 | 03.00

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


When you create a function you have give name for that, like "myfunction". It's with this function name that you will be able to call upon your function.

In PHP you can create the function by using the syntax

function myfunction()
{
....
...  // some codes to be processed
...
}

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)

Example:

function myfunction()
{
echo "The function is executed";
}
echo "Here ";
writeName();
Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger