PHP stands for
PHP: Hypertext Preprocessor.
PHP gets executed on the server and is returned to the browser as plain HTML.
PHP has to be downloaded and installed (though most web hosting providers offer it already) from http://www.php.net
Assuming you have a web hosting provider with PHP, we will already start coding.
A PHP code is defined with something like HTML tag. Inside the "tag" we put the codes.
- Code:
-
<?php
//Some code
?>
PHP can also have enabled the
short form, which would be:
- Code:
-
<?
//Code
?>
If you installed PHP by yourself, you will be able to enable all that in the
php.ini file.
Now we want the PHP code to say something. To output some text. We do that with the
echo. It's not a function, but a language construct, according to PHP.net.
- Code:
-
<?php
echo "Hello there!"
?>
This will output:
- Quote :
- Hello there!
Stay tuned for the next tutorial, when we will do... variables!