Basics of PHP
Here you will find a tutorial that is about the very basics of developing in PHP. This tutorial will continue to grow as I add more to it and is a beginning step for newbie PHP Developers or for those looking for a refresher.
**NOTE: PLEASE DO NOT REPLY TO THIS POST. IT WILL MESS UP THE INDEXING! ALL REPLIES MADE WILL BE REQUESTED TO BE DELETED**
Getting Started:
If you have never developed a web site or a web page before, at all, I would suggest reading up on some tutorials about developing using HTML first. Once you've become accustomed to HTML's language, then you should come back and begin your journey into PHP here. This tutorial is going to give advice as to how to do certain actions using PHP.
**NOTE: PLEASE DO NOT REPLY TO THIS POST. IT WILL MESS UP THE INDEXING! ALL REPLIES MADE WILL BE REQUESTED TO BE DELETED**
Getting Started:
If you have never developed a web site or a web page before, at all, I would suggest reading up on some tutorials about developing using HTML first. Once you've become accustomed to HTML's language, then you should come back and begin your journey into PHP here. This tutorial is going to give advice as to how to do certain actions using PHP.
1.) PHP Basic Syntax:
PHP has special opening and closing tags for its code blocks, very much like HTML's opening and closing tags (<html></html>). These are mandatory to be wrapped around any PHP code that you submit.
Example: Opening and Closing of a code block in PHP
PHP:
<?php
?>
Below, we have an example of a simple PHP script which sends the all too well known text "Hello World" to the browser:
PHP:
<html>
<body>
<?php
echo "Hello World";
?>
</body>
</html>
*NOTE:There are two basic statements to output text with PHP: echo and print. In the example above we have used the echo statement to output the text "Hello World".*
*NOTE: The file must have the .php extension. If the file has a .html extension, the PHP code will not be executed.*
Last edited: