PHP Basics
Welcome to the PHP tutorial, you probably already learned some HTML and if you haven't you should go back and learn it, now onto PHP this stands for PHP Hypertext PreProcessor it is a server-side language which means php scripts are executed on the server. Thus PHP code is executed on the server and the resulting plain HTML is sent to the browser common file extensions for php include: .php .php3 or .phtml but usually it is simply .php.
A PHP scripting block always start with <?php and ends with ?> a php file usually contains php scripting and some HTML tags each code line in PHP must end with a semicolon ( ; ) it is a separator and distinguishes instructions from one another.
The next bit of information is totally new to you unless you've studied programming before so if you haven't i will cover it for you. Now what im about to talk about below are called variables, the best way to think of a variable is that it's a storage box. A big cardboard box that you put something in and leave alone or store somewhere. A variable does the same thing it takes something you create (data) and puts it in a box (variable) that you can use later.
To make a variable in php use the following syntax (basic code) : $var_name = value .
ALL variables in php start with a $ symbol once a variable is made it can be used over and over in your PHP script.
For more information on php variables and there uses continue to the next page below.
A PHP scripting block always start with <?php and ends with ?> a php file usually contains php scripting and some HTML tags each code line in PHP must end with a semicolon ( ; ) it is a separator and distinguishes instructions from one another.
The next bit of information is totally new to you unless you've studied programming before so if you haven't i will cover it for you. Now what im about to talk about below are called variables, the best way to think of a variable is that it's a storage box. A big cardboard box that you put something in and leave alone or store somewhere. A variable does the same thing it takes something you create (data) and puts it in a box (variable) that you can use later.
To make a variable in php use the following syntax (basic code) : $var_name = value .
ALL variables in php start with a $ symbol once a variable is made it can be used over and over in your PHP script.
For more information on php variables and there uses continue to the next page below.