Introduction to PHP

            Among all the languages available for programming when it comes to web development PHP is among the most sought after language. It is mainly used for back-end development. You will learn in the future articles, what back-end is.
For now just assume that it is something what you do not see while surfing the internet, but it is what makes the internet work. 
PHP Logo
          PHP was developed in 1995, along with JavaScript, Java and a bunch of other programming languages. It was solely developed for the purpose of web development and to this date a majority of uses of PHP are in the field of web-development. I am assuming that you know a few things about programming and are familiar with computer programming terminology. So let’s begin.

          Before learning PHP, you must know a few basic things. Always remember these, they will come in handy when you are developing a PHP application. 

1. Always write your code between: <?php expr ?>
2. All statements must end with a semicolon (;)! Otherwise errors will be generated.
3. Variables in PHP are declared with the help of ‘$’ e.g
        $a; //Declares a variable of integer type
4. Single quotation (‘’) are evaluated for their literal value. E.g.
        $a = ‘one’;
        echo ‘$a’;
5. Double quotations are evaluated for their values.
        $a = ‘one’;
        echo “$a”;
6. ‘//’ means comment for a single line. Anything after this will not be read by the PHP compiler. For multiple lines we use /* text */.
7. A function in PHP is more or less like functions in C. e.g
     function  function_name($parameter1, $parameter2){

PHP has a number of in-built functions which are useful when you are working on application development. Few of them are eval($string), sleep($integer), urlencode($string) and a lot more. I urge you to explore as much of these function as you can, because these will aid you in effective web-development. In the next article we will learn about the tools needed to develop a PHP application..

More articles on PHP to be published soon.... !



Post a Comment