Basics of PHP - Part 1
Over the next few days I would like to introduce you to the basic principles of PHP. As always it will take you no longer than 60 seconds to scan over the information and pick up some ideas. (Click view page to read more)
PHP is server side web code. This means the code is executed on the webserver before the webpage is sent to your PC. Lets take a look at a simple example.
<?php echo "hello world" ; ?>
<?php - tell the server the following text will be PHP code
echo - a PHP function to echo out information
"hello world" - the text you want to echo
; - tell PHP you've finished with that particular part of code
?> - close PHP tag
If you were to have the above code on your webpage, it would print 'hello world'. A good way to test if PHP is enabled on your server is to create a page with the following code:
<?php phpinfo() ; ?>
If PHP was installed correctly the webpage would show you all the information relating to your PHP installation. When you think about PHP, think about Apache HTTP, that is the common web server for hosting PHP websites.
Cheers
Ryan Partington


