20.09.2011, 07:00
In this tutorial i will be teaching you the basics of the PHP programming language, i bet your thinking most of us know the basics why teach? well its so incase new people join that don't know what a variable is so lets begin
What i will be teaching is - Variables
That there is a variable. Well i bet your asking what does it do?? well it will echo (show something) so if it echos the variable test it will show the text in the "" so in this case it is "hai" that is a basic output (echo) and a variable ($test)
now if you wanted to output a number so like this
The $ sign declares the variable its a bit like the Dim in VB programming you cant have a Variable without it What the semicolon ";" does is it ends the line of code your working with so E.G
if i don't end that line of code php will just keep reading it so its needed if you have several lines of code. Now i bet your saying yo assho*le what is a variable well a variable is just something that stores information, data ETC so like this
I hope i helped some people and i will be doing more tuts
Please don't go hating please i am not that good with Tutorials i tried my best that's all i can do - but my coding is top notch
What i will be teaching is - Variables
PHP код:
<?php
$test = "hai";
echo $test
?>
now if you wanted to output a number so like this
PHP код:
<?php
$tutorial = 22; // (Notice i didnt put it in some "" thats what you do with numbers there isnt any need for"")
echo $tutorial
?>
PHP код:
echo "Test";
PHP код:
$SimonCowell = "Retard"; // Now this is information (A FACT) now the variable $SimonCowell will store his name which we know is a fact for to be used in other codes.
echo "HE IS A FAG";
Please don't go hating please i am not that good with Tutorials i tried my best that's all i can do - but my coding is top notch