Cazpa.com PHP Developer & Website Designer

17Feb/1025

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

9Feb/1017

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.

26Jan/1025

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

6Dec/090

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!

21Oct/090

Subscribe

Join our mailing list

After building website's for many years I have decided to change my business model and the way that I deliver my service, Over the years I have made hundreds of PHP scripts, website templates and website's and have found that I am getting more and more people ask for the same project types over and over again so now I am about to release all of my scripts, most will be free and some of them will be for a small fee nothing like other website's are charging.

All you need to do is subscribe and I will let you know when scripts become avaliable, some will come included with Master Resale Rights!

You may un-subscribe at any time if you feel that you no longer need my free PHP scripts, cheap scripts, tips, tricks, and strategies on how to make your website profitable

Subscription

Fill out the form below to signup to our blog newsletter and we'll drop you a line when new articles come up.

Our strict privacy policy keeps your email address 100% safe & secure.

G-Lock opt-in manager for bulk email software.

   
Powered by WordPress Lab