PHP Tutorials: Automatically Watermark Image on Upload
This will automatically upload, save and display a watermarked image. The user will upload an image, it will then be processed and an external watermark image will be placed in the bottom right hand corner. The watermarked image will then be saved and is ready to be used. FORUM phpacademy.org TWITTER twitter.com BLOG blog.phpacademy.org
PHP Tutorial: Non-database Photo Album, plus LightBox! (Part 3)
Create a file based photo album. Easy to customise, easy to embed. Displays photos using LightBox technology. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
PHP Tutorials: Uploading/Storing an Image inside a MySQL Database (Part 1)
Uploading and storing images inside a MySQL database, rather than as a file in a web directory. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
PHP Tutorial: Non-database Photo Album, plus LightBox! (Part 1)
Create a file based photo album. Easy to customise, easy to embed. Displays photos using LightBox technology. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
PHP Tutorials: Pagination (Part 1)
Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com Paginating results from a MySQL database. This is a (almost) simple method of showing paginated results effectively.
PHP Tutorials: Show Recent Twitter Tweets using cURL
Show your most recent Twitter tweets using curl, a free client-side library standard to most hosting packages. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
PHP Tutorials: Pagination (Part 2)
Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com Paginating results from a mysql database. This is a (almost) simple method of showing paginated results effectively.
PHP Tutorials: Random Password Generator
Create a random password generator from a specific character set. Visit the forum for help! phpacademy.info Follow on Twitter! twitter.com
PHP Functions (Arguments & Values)
Creating a basic fuction
Functions are great for cutting down on code and making things easier to read when developing, you can create a function
for just about any process including conditional statements, loops or even calls to other functions.
This article will show you how to create simple functions for your applications and website's.
First things first we need to know how to define and invoke a function:
<?php
// Define your function
function displayEinsteinQuote()
{
echo "Do not worry about your difficulties in Mathematics. I can assure you mine are still greater.";
}
?>
<?php // Invoke your Albert Einstein Quote displayEinsteinQuote() ?>
Once you invoke your function this will output:
Do not worry about your difficulties in Mathematics. I can assure you mine are still greater.
Now I know what you are thinking, why not just echo the quote to begin with? well the next example will show you how to use
a variable to create a more dynamic function
<?php
// Define your function with simple argument
function ConvertStoneToKilos($stone)
{
$diff = '6.35029318';
$total = ($stone*$diff);
echo "$stone stone is the equivilant to $total kilograms";
}
?>
<?php // Invoke the function ConvertStoneToKilos(11); ?>
This will convert eleven stone into kilograms (69.85322498), of coarse changing the varaiable in the brackets will change the output!

