In this tutorial, I'll be teaching PHP.
Before we start, let's talk about the basics of PHP.
You will need a server. If you're on a Mac, Google "Mamp"; if you're on a Linux, Google "Lamp"; if you're on a Windows, Google "Wamp".
Your files will go in the Mamp, Wamp, or Lamp folder's htdocs.
PHP stands for Php Hyper-Text Processing.
PHP is a Server Language, which means that it runs on the server vs. the computer.
Now let's Begin
Chapter 1-1 - Beginning
Every line in PHP ends in a semi-colon.
99.9% of the time is lower-case.
Every thing is inside <?php and ?>.
Chapter 1-2 - Beginning
A simple, but heplful command is echo which prints HTML on the screen; if you don't understand this, go learn HTML.
<?php echo "Hello!"; ?>If you do that, you should see the following.
To create a variable, type $, then the the name (no space), type =, then type a number; if you want it to equal some text, put quotes/single quotes around it.
To put a variable within a echo statement do it like this.
<?php $hello = "Hello"; echo 'Hello is equal to'; echo $hello ?>or
<?php $hello = "Hello"; echo "Hello is equal to'; echo $hello; ?>or
<?php $hello = "Hello"; echo 'Hello is equal to' . $hello . ' '; ?>Thanks For Reading Chapter 1!
Written by HannahI