Checked At:06:21
5 Guests
0 Users
Online doing the past 15 Minutes!
brugbart.com - Edition/Last Updated: 13. October 2008
Posted The: 03/04/2008 - AT: 8:47
PHP is a serverside programming language, which is used to preprocess data such as:
Note: PHP is not a replacement for html or css, instead it is used togetter, to create "dynamic" websites. It is also used to make calculations, and take decisions if a given condition is met.
You either need your own server such as Apache, with php installed. Or a host which has support for PHP on their server.
I would suggest that beginners simply buy a domainname, and some hosting space, an example of such a host would be one.com.
Most examples will start out with the build-in function called "echo", as will this. Lets start by outputting some text to the browser, using echo.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<!--This is a HTML comment-->
<title>My first Website</title>
</head>
<body>
<?php
echo '<p>My first Website.</p>';
?>
<!--This is a HTML comment-->
</body>
</html>As seen in the above example, we start by telling the server that we are going to write php. Every server which has support for php understand, "<?php" as start tag, and "?>" as end tag. You can also use the echo function to output the whole page, as seen below.
<?php
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<!--This is a HTML comment-->
<title>My first Website</title>
</head>
<body>
<p>My first Website.</p>
<!--This is a HTML comment-->
</body>
</html>';
?>The above isn't really useful, so lets start using php for some useful tasks in the next few tutorials.
Author: BlueBoden
Comments: [0]


Checked At:06:21
5 Guests
0 Users
Online doing the past 15 Minutes!
This page was created in 0.259236812592 seconds
Welcome Guest