Tutorial name: Functions with PHP
You're experience: Advanced
Time Taken: 1-2 minutes
Plug-ins needed: none.
Functions with php are fairly simple.
First of all what is a function? it is a small tid bit of code that is ran each time it is called, and it allows for information to be returned, outputted, and inputted. In away, you can replace classes with functions, it ain't to hard, but it is possible. I use functions rather than classes because i feel more comfortable with them.
i will show you two things, how to use a function, and how to replace classes with them for developed coders, another time.
This will show you the basics to functions.
function repeatString($string, $times) // you can use what ever variables you want, and however many you want.
$count = 0;
while($count < $times)
$count += 1;
Blah blah blah...
repeatString("Hello!", 10); // this will echo "Hello!" 10 times
$rand = rand(0, 1);
blah blah blah...
if($num > 0)