2007-12-12

The Beginners Guide to PHP

The full form of PHP is Hypertext PreProcessor and is a server-side scripting language. The PHP code can be combined with regular HTML tags and parsed on the server. The creator of PHP, Rasmus Lerdorf first displayed the language in the form of a Perl script. In 1997 it was adapted by Andi Gutmans and Zeev Suraski to use a C-written compiler. They completely reconstructed the original PHP into the web language that we know and use today.

Uses of PHP

Beginners Guide to PHPIt is used in the creation of dynamic web pages. Web developers like it because of its fast parsing and flexibility and versatility. PHP is a popular tool for managing a form's data after it is submitted and comes built in with many different interfaces and API's. It has database capability built into the language, the most common database being MySQL. Typically the PHP can connect to any SQL enabled database.

The Syntax of PHP is similar in structure to Perl and C where curly braces { } define blocks of code and semi-colons specify the end of a statement PHP is as easy to learn as Perl. It maintains all the traditional loops, if/else, and subroutines that are expected in a programming language. One difference between the two is that the code'?' is embedded in with the HTML; you could however, use a separate file. The PHP code is different from HTML code by use of the opening and closing tags. When it finds a PHP file, it tells the server to scan through for these tags, and execute the code in between them. The server recognizes a PHP enabled file by its extension, .php. These are essentially HTML files with PHP codes in them.

Getting Started

To start PHP requires a server with PHP installed and a simple ASCII text editor such as Notepad or VI, eMacs, Kate, etc. for a UNIX/Linux machine.

What are the problems faced by PHP? It is case sensitive. For example if you name a variable $MyVar, you cannot call it as $myvar or $mYvAr. In case you forget to close your curly brackets, then it helps to indent lines inside the curly braces so that any missing braces can be spotted easily.

Time to optimize

Ready for the next step? Let us learn how to implement SEO to your hosting plan.

Add Your Thoughts

Gravatar

Commented by: Aarushi, 11 May, 2009

Good

  • creative meeting index
    2012-01-10

    Web Design Trends 2012

    As the new year begins, web designers and Internet users alike are curious about the kinds of web design trends that will gain prominence in 2012. Every new year brings exciting changes to the world of web desig...
  • web programmer
    2011-10-04

    HTML5: The New Placeholder Property for Better Form Instructions

    A coder’s job function is to make a website work properly with the least amount of code as possible. Succinct coding creates efficient, fast websites that are easier to debug if errors occur. Although the Wor...
  • 2011-08-19

    How a Hacker Performs a SQL Injection Attack and How to Protect Your Data

    Hackers use Structured Query Language (SQL) injection to steal or delete data on a database server. In extreme case...
    hacker protection
  • accessible left
    2011-01-11

    25 Ways To Make Your Website Accessible

    As people’s use and awareness of the Web grows, accessibility (or “universal design”) becomes more crucial. Accessibility is determined not only by a website’s code but by its design and content, which i...
  • typography3
    2011-03-28

    Ten Great Fonts and How to Create a Custom Font

    Designing a website consists of tying together a plethora of design details into a single user-friendly experience. One of these important design details involves the font used to communicate the website's conte...
  • silverstripearticle
    2010-12-08

    7 Powerful and Popular Content Management System Options

    CMS (Content Management System) has become an indispensable super-widget for the creation and updating of a professional website with no knowledge of HTML or other code. With a dedicated server that provides exc...
  • 2012-01-23

    40 Amazing Abstract Photoshop Tutorials

    Photoshop is a powerful tool that belongs in any designers toolbox. From the range of photo editing techniques available, to creating website mockups and designs, to making fantastic wallpapers, Photoshop has a ...
  • 2012-01-10

    The 50 Best Linux GTK Themes

    One of the often touted best features of Linux is one's ability to manipulate the system to meet their personal needs and tastes. One of the ways this is done is via themes, GTK being one such variation. For ...
  • 2011-09-01

    30 Web Developer Cheat Sheets

    The list of skills a given web developer must possess is growing everyday. With the massive growth of web technologies, comes the demand for developers with a wide skill set. A useful tool in any developers tool...
  • 2011-07-07

    The Best AppleScripts Speeding up Tasks

    If you are a programmer or have messed around on a Mac for a while, chances are you might have heard of this wonderful little language known as AppleScript. So what is AppleScript? AppleScript is a scripting ...

1 2 3 4 5 6

Overall Best Web Hosts

1. $2.95Review Visit
2. $4.45Review Visit
3. $3.67Review Visit
4. $4.95Review Visit
5. $5.95Review Visit

Buying Guide

Can't decide what hosting is right for you? Answer 2-5 questions and get your perfect hosting match!

To Questions

User Reviews

Make your voice heard. Review your web hosting provider - good or bad.

  •  
  •  
  •  
  •  
Everything has been very stabile and I was very impressed with all the features and extras that were included in the plan.

Bill about iPage

Read iPage Review