Hello and welcome to the Webmasters Forums!. This is the best place to get webmasters resources for free. Get $2 for free today, read more - Make your payment today. Download premium and professional templates for free. Get free web hosting without ads, read more. You can get lot more by simply join with this forum. To gain full access to the forums you must sign up for a free account.


Post Reply  Post Thread 

PHP Introduction

Post Bank
Posting Manager
******

Posts: 995
Group: Forum Team
Joined: Sep 2006
Status: Online
Make money from now. You can make money just for posting on this forum. Every discussions on this community gives you more money. $2 minimum payout. So get your payment today, SignIn with this forum.

Signin to Remove this Post

clookid
Advanced Member
***


Posts: 184
Group: Registered
Joined: Oct 2006
Status: Offline
Reputation: 4
Points: 134 (Donate)
Post: #1

PHP Introduction


PHP Introduction

Welcome to the PHP Introduction by Clookid!

After reading this tutorial you will 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.
Before starting this tutorial you should know:
  • basic HTML.
  • basic XHTML.
PHP stands for Hypertext Preprocessor and is used for web scripting.
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:

Code:
<?php
    echo "Hello, I am an echo function!";
?>


The above example will output the following:
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:

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>


Make sure that you do not get mixed up with HTML when doing PHP.
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!


Veebra Articles - Computer and technology related articles.

This post was last modified: 28-10-2006 08:10 AM by clookid.

28-10-2006 08:09 AM
Find all posts by this user Quote this message in a reply
ivenms
Administrator
*******


Posts: 2,179
Group: Administrators
Joined: Sep 2006
Status: Offline
Reputation: 14
Points: 4389 (Donate)
Post: #2

RE: PHP Introduction


Wao.. Nice tutorial.

This will help others to fall into the PHP programming language. All biginers are entering to this language through the Hello! page. Me too...

You can also use print() function to print hello page:

Code:
<?php
    print "Hello, I am an echo function!";
?>


Read: General Rules & Policies before posting.
Make Money By Posting | Earning and Exchanging Points | Add Your Links
28-10-2006 01:57 PM
Find all posts by this user Quote this message in a reply
clookid
Advanced Member
***


Posts: 184
Group: Registered
Joined: Oct 2006
Status: Offline
Reputation: 4
Points: 134 (Donate)
Post: #3

RE: PHP Introduction


Thank you for the feedback! I am going to use this tutorial on my own website.... well that is when I get a domain name! I was going to introduce the print function in my next tutorial about 'Variables' because it makes them a heck of a lot easier to do!


Veebra Articles - Computer and technology related articles.
29-10-2006 07:04 AM
Find all posts by this user Quote this message in a reply
programmersbank
Newbie


Posts: 13
Group: Registered
Joined: Sep 2007
Status: Offline
Reputation: 0
Points: 51 (Donate)
Post: #4

RE: PHP Introduction


very simple but easy tutorial, please provide more info about php

13-09-2007 09:00 PM
Find all posts by this user Quote this message in a reply
bhushan
Newbie


Posts: 2
Group: Registered
Joined: Aug 2008
Status: Offline
Reputation: 0
Points: 1 (Donate)
Post: #5

Smile RE: PHP Introduction


thanx........................Smile

02-08-2008 03:06 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:

Forum Jump:

Sign In to Remove Ads

Download 1000's of web templates. Unlimited access!
World's Best Web Hosting
Website of the Month

Create-a-Page for Free
SOTM June 2008


Accepting Submissions
for July 2008
Resources

Recommended Sites:



Visit our Sponsors!

Current time: 07-09-2008, 06:50 AM


Copyright © 2002-2008 MyBB Group
Powered By MyBB