Share on Google+Share on Google+

PHP Steps

Advertisement
First of all, before stepping ahead towards your first baby coding, lets check the developing environment of your system first.

3.1 The Basics

First of all, before stepping ahead towards your first baby coding, lets check the developing environment of your system first. All the necessary software must be installed on your system including PHP5, MySQL, and httpdApache Server. If those are already available, then move towards your first code.

First of all, let’s see a snap shot of building blocks of PHP using a sample script. The example script is titled “Roseindia.php”. When this script is called by any web browser, it would read the print text “Roseindia Technologies Private Limited.”

    <?php
    print ("Roseindia Technologies Private Limited ");
    ?>

This is the first and most fundamental lesson of any PHP beginners that a PHP scripting block always begins with <?php and ends with?>. There is no obligation of putting the scripting block of PHP, means a PHP block can be placed anywhere in the document.

The standard form of beginning and ending the PHP block is to use “<?php” and “?>” symbols respectively which is maximum compatible, while “<?” and “?>” is the shorthand method, which is not so simpatico and many times does not get the support.

As we have earlier mentioned that a PHP file embed with HTML tags and is written from the syntax of C, Java, and Perl with PHP scripting code.

Advertisements

Posted on: July 10, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.