Thursday, December 31, 2009

3:00 AM
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


- Give the function a name that reflects what the function does
- The function name can start with a letter or underscore(not a number)


function myfunction()
echo "The function is executed";
echo "Here ";