MySpaza - How To



My First PHP lessons - Hello World
php first lesson simple step one hello world

Added: 2008-01-03 15:48:59

The world of PHP......

PHP stands for PHP Hypertext PreProcessor (yes the first P stands for PHP!)

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

What you will need (other than your pc):

- NotePad or a similar non-intrusive text editor (never use MS word)
- A webserver / webspace that supports PHP.

Ready?

Moving swiftly on.....

Files with the .php extension are processed on the webserver and delivered to a users browser in HTML, hence PreProcessor.

Ok, enough talk, here's an example.....

First we must inform the server we wish to use PHP on our page.

We do this by using the <?php and ?> tags

<?php

echo 'Hello World';

?>

Your web browser would display:

Hello World

Confussed? Dont be, this is exactly how I and most people began learning to code. Looking at this example you may be thinking. Whats the point in that? This example is one of PHP's most basic use's and is merely to demostrate the processing carried out on the server.




Add a comment to this post
Email confirmation is required for each post

Name:
Email:
Comment:
 

Comments from other users:




Copyright MySpaza.Co.Uk - 2008