Here we go, PHP in five minutes.
To indicate the start and end of a block of PHP code, you've got to use PHP's start and end tags, like this:
In between those, you can use PHP functions. For example, the include function:
PHP Code:
<?php
include();
?>
Note the semicolon at the end of the line. All PHP instructions must end with a semicolon to signify to the interpreter that the command is finished.
Functions in most language take what are called "arguments". These are bits of information passed to the function that tells the function what to do or changes the way it does something. In PHP, these arguments are comma-delineated and placed in parentheses after the function name. If no arguments are to be given to the function, the parentheses must still be present, but should be empty. In the case of the include function, we need to pass the name of the file to include:
PHP Code:
<?php
include('file.inc');
?>
That will cause PHP to try to include the file file.inc (where "inc" is an abbreviation of "include") from the same folder as the script into the current output.
Note the single quotation marks around file.inc. These tell PHP that file.inc is a "string" - a set of characters that all go together. You can also use double quotation marks; there's a few differences, but that's beyond the scope of this post.
So, there you go, a crash course in PHP. To use any PHP, you'll have to rename your files to .php instead of .html; that way, the x10Hosting webserver will know that you want to parse the files with PHP. For further reading, check out the PHP tutorial at W3Schools.
Have fun!
--- Sarnuial