CodeCrunch - http://www.codecrunch.com
Starting PHP - 1
http://www.codecrunch.com/articles/77/1/Starting-PHP---1.html
By Daniel Phillips
Published on 06/28/2006
 

A simple guide to the PHP coding language.


Starting PHP - 01

To start PHP, you must have the following:-

- A PHP Enabled Server
- Knowledge on how to upload files
- Basic FTP info.


Now, if you have those things, please read on, if not, read some other articles.


Look at the following code:

<?php

$variable = "Hello World!";
print $variable;

?>


Now this isn't exactly what most people start off with but in this tutorial I will teach you about both Variables and printing text to screen.

Lets look through the code line by line:

<?php

This opens up PHP, so the server knows what its about to do.

$variable = "Hello World!";

This declares a variable, with the string, Hello World!, inside of it.

?>

This ends PHP.


Starting PHP - 01

This code, would simply output Hello World! In plain black text in a PHP web-server.

PHP Dictionary So Far:

$variable = ""; - Declares a string variable.
print ""; - Outputs text onto a screen.
echo ""; - Exact same as print.