PHP – Step by Step

Date: December 20th, 2006
Author: Ivory Morhuld

PHP is an HTML-embedded scripting language. Much of it”s syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.

PHP. Why is so popular?

The key power of PHP is that this scripting language is very popular in developers and therefore among in hosting service provider.
Mean reason for this is free/open source model for distribution of PHP. The main goal of this is cheap and easy serviceing and developing of internet applications.

Now let”s start from the beginning. Declaration.

You already know that the PHP is script language. This mean that the script execute on web server by parsing the code and returning to user static html code. Parsed part must be enclosed with <?php and ?> or <? and ?>

All static html tags are just sended to clients browser like they are on web page. But the PHP part (<?php…..?>) is executed on server and depending on code will output something to browser. In our case this will be nothing because we just have write comment code which do nothing for executing of application.

Please note that in older versions of PHP (<3.0) enclosed tags are <?php and ?> only

  1. <html>
  2. <head>
  3. <title></title>
  4. </head>
  5. <body>
  6. <?php
  7. // Here is PHP code
  8. ?>
  9. </body>
  10. </html>

Comments in PHP

Like any other language PHP have code comment capabilities. You can see from code below tags for commenthing the code and how to use them.

  1. <?php
  2. // With two slashes together you can comment entire row of code to the next new line.
  4. # This symbol also used for commenting all code on the row
  6. /*
  7.  In this way the part of code
  8.  which is placed between this
  9.  starting and ending symbols
  10.  will be rejected from executing
  11.  on server
  12. */
  13. ?>

PHP : Hello world

Of course first example of our tutorial will be ”hello world” sample code.

  1. <?php
  2. echo "Hello world!";
  3. ?>

As you can see, the code above will just output "Hello world!" string.

PHP - Step by Step

VN:F [1.9.18_1163]
Rating: 10.0/10 (1 vote cast)
PHP - Step by Step, 10.0 out of 10 based on 1 rating

6 Responses to “PHP – Step by Step”

  • Error: Unable to create directory wp-content/uploads/2018/02. Is its parent directory writable by the server? Ivory Morhuld says:

    You are totally right! We correct this. Thank you.

  • najmul Hasan says:

    Sir, Plz Tell Me about PHP Step By Step

  • najmul Hasan says:

    Dear Sir, Plz Tell me About Php

  • Saurin Dashadia says:

    i have one question about your article…
    u named it as a step by step PHP..
    But where are the other steps??
    as i didnt get any link to go on second step…

    other thing is…
    as many people will post a comment over here..

    how to recognize the author between guest’s post…

    please make two improvements…..

    1). when ever you answer to my post i should get an email notification so that i can see the improvements or catch,things i need.
    2). Make the author’s answer different from other comments, this will help us to identify the authorized answers easily.


  • seo says:

    This is such an amazing useful resource that you’re providing and you give it away for free. I really like seeing websites that perceive the value of providing a quality useful resource for free. Good work

Leave a Reply