Working with php functions is pretty simple. A function is basicly just a reference to a peice of php code. We can create a block of code and give it a name then call that name later to run the php code. This helps us by being able to reuse the same code over and over without having to keep wirting the code again and again.
A basic php function looks like this
<?php
function say($string) {
echo($string);
}say(‘blah’);
?>
its basicly that simple. Notice how say is now a reference to echo. We can now use <?php say(‘anything’) ?> over and over again. You might not want to use echo’s since its basicly already a function but you get the idea of how functions work.

Wed, Mar 17, 2010
0 Comments