PHP Tutorial – Language Introduction

Before we can start coding you first need to know some basics. In this PHP language introduction tutorial you’ll find some descriptions of words you should know before you can start coding. Of course we will also look at where you can download PHP, MySQL and Apache.

What is PHP?

The PHP programming language is a server-side HTML embedded scripting language.

Let‘s depict the sentence. The PHP language runs on the server-side. This means that the execution (read starting) of the scripts are done on the server where the web-site is hosted. HTML embedded means that you can use PHP statements (read a piece of PHP code) from within an HTML code. PHP files are returned to the browser as plain HTML.

The last piece of the sentence – scripting language – is a little harder to explain, but we will give it a go. A scripting language is a form of programming language that is usually interpreted rather than compiled. In programming languages such C or C++ you compile the program (permanently) into an executable file, before you can execute the program. A program that is written in a scripting language, is interpreted one command at a time by a command interpreter (Command interpreter is in most cases an executable written in another language (for instance C/C++) than the scripting language.) Some other examples of scripting languages are Perl, Phyton, Java and Ruby.

A last note: scripting languages are also often used by applications as control or configure language. An example: Firefox is written in C/C++ and can be controlled with JavaScript.

Things You Should Know

Because PHP is an HTML embedded language you should have a basic understanding of HTML/XHTML and (a little) JavaScript. In the coming tutorials we will explain the PHP code, but we won’t explain the HTML code (at least not in great detail.)

What is PHP?

  • PHP stands for PHP: Hypertext Preprocessor.
  • As we said before it is a server-side scripting language.
  • PHP is free and is an open source software product.
  • The PHP scripts are executed on the server.
  • PHP supports many databases (MySQL, Sybase, Oracle and many others.)
  • PHP runs on different platforms (Unix, Linux, Windows.)
  • PHP is compatible with almost all web-servers used today (Apache, IIS, etc.)
  • A PHP file can contain plain text, HTML tags and scripts
  • The PHP files can have one of the following extensions: php, php3 or phtml.

What do you need?

Before you can follow the coming PHP tutorials you need to have the following:

  • Access to a web server (like Apache)
  • PHP and MySQL should be installed on the web server.

The easiest way is to find a cheap web hosting plan that support PHP and MySQL (most of the web-hosting providers do.) For a couple of bucks a month you can get a virtual host. The advantage is that everything is already installed and that you can share your program (that you are going to write) with the rest of the world.

If you don’t want to spend money, you can also install everything on your local machine. The easiest way is to install WAMP if you have a Windows machine and LAMP if you have a Linux machine. (WAMP = Windows Apache MySQL PHP and LAMP = Linux Apache MySQL PHP.) These packages install everything you need. Read the install manual of these packages for instructions. After installation you should have access to http://localhost in your browser.

The examples on this Site

To keep things small we will not place every example between <html> <body> some piece of PHP code </body></html>. In most cases you need to add it yourself if you cut/paste some piece of code.

That is all for this PHP language introduction tutorial. We hope that you will learn something from the coming PHP tutorials and as always we hope that you will let us know if something is wrong by leaving us a comment.

This entry was posted in PHP Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

There are currently 12 responses to “PHP Tutorial – Language Introduction”

Why not let us know what you think by adding your own comment!

  1. harit on July 17th, 2011:

    actually sir i wants to know that ,,,if i did not have any knowledge about c and c++ languages,
    still is that possible to learn php …

  2. admin on July 17th, 2011:

    @harit Of course it is possible to learn php without c or c++ knowledge. Just following the php tutorials on this website and you’ll be well on your way!

  3. subh on November 25th, 2011:

    Thanks sir u have given very good contents.It is very helpful for not only me but also for other interested students….

  4. sayoojsmcet on January 20th, 2012:

    thank u sir for giving valuable information about php.

  5. avnish singh on August 1st, 2012:

    thank you for this tutorial it is useful..

  6. Brian on March 28th, 2013:

    emphasize a bit on some of the applications of php and is it a necessary tool for telecommunications engineer

  7. Chandrakanth Thigulla on May 18th, 2013:

    Thanks sir u have given very good contents.It is very helpful for not only me but also for other interested students….

  8. BAAS on July 17th, 2013:

    thanq vry much.. this tutorial is vry useful for us

  9. Billy opiyo on July 23rd, 2013:

    Thank you so much for this. which language is best to start with as a new learner in programming

  10. pooja on February 11th, 2014:

    hello sir i have wamp server installed on my pc, so my question is do i need to install ny text editor like dreamweaver or the notepad wil be sufficient for php coding??

  11. admin on February 11th, 2014:

    @sindhu : Notepad or notepad-plusplus should be sufficient to write php scripts. You can also use eclipse, which has code highlighting and debug options. Good luck

  12. nawaz on May 15th, 2014:

    Thanks sir u have given very good contents.It is very helpful for not only me but also for other interested students….