PHP Introduction
Welcome to the PHP Introduction by Clookid!
After reading this tutorial you will know:Before starting this tutorial you should know:
- how to start a PHP document.
- what PHP stands for.
- what PHP actually is.
- the echo function.
- how to end a PHP document.
- how to embed a PHP document into an HTML document.
PHP stands for Hypertext Preprocessor and is used for web scripting.
- basic HTML.
- basic XHTML.
First of all I am going to introduce an example and tell you what the output is; I will secondly tell you what each line does and then close off this tutorial.
Here is the example:
Example 1-1:
The above example will output the following:Code:<?php echo "Hello, I am an echo function!"; ?>
Hello, I am an echo function!
Make sure that you don't think that PHP is the next generation of Maths or whatever subject you struggle with, because really it isn't. It is so easy but gradually gets a little bit harder.
Also here's another thing, don't think of PHP as a big scary language, just think of it as HTML with some really helpful functions.
Line 1:
<?php is just introducing you to the PHP document, simple!
Line 2:
This here is the echo function, to write one of your own just replace the text surrounded by quotes, don't forget the semicolon though!
Line 3:
?> is just closing off your PHP document.
Here is that exact same example again except this time it is embedded into an HTML document:
Example 1-2:
Make sure that you do not get mixed up with HTML when doing PHP.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Echo Function</title> </head> <body> <?php echo "Hello, I am an echo funtion!"; ?> </body> </html>
Eg. do not use <?php> or <php> when starting off your document.
Thank you for reading this tutorial, make sure you start memorising the functions that I taught you in this guide.
You must have authors permission to use this tutorial!
Nice Introduction.. very simple intro it seems..
where you got it mate?
I wrote it... I wouldn't have posted it if I didn't!
Hey I just asked.. Seems you got upset of my reply.
I'm sorry if i was hurt you ok.
And I used to search through the net and post useful things for the forum members....
.
I wasn't angry... God, I should know better than to post sarcasm over the internet!
“Let the bucket of memory down into the well,
bring it up. Cool, cool minutes. No one
stirring, no plans. Just being there.”
DUDE , quotes :YUK:
Well nice intro and all , i like it!
I like it too. And if you write it yourself, you are good.
(( Still not excellent ))
Keep it going on and make some more, maybe you can write some e-books yourself, I'm working on some.
WOW!!..
We are to get some awesome E-Book from CodeCall Programming Expert!..
Don't forget to give us a thread about your Book buddy!!..
I am not exactly an expert at PHP, I only know the echo function and variables!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks