PHP is a server side language, which means it execute on the server machine and send output to the client machine.

so Server is like a computers which store information on it memory and display data on the machine connected to Internet. This system is setup via assigning a Fixed IP to that machine, so that the file on the machine can executed anywhere in world,

The system we are using will called as client machine, Which ask data from the server machine to display the information on the screen or output device like Printer.

So PHP is sever side languages, which actually create the HTML with some numeric or Theoretical calculation done by the programmer.

so here are a Basic PHP Program , which simply print hello in the webpage.

The PHP start with <?php and end with ?>
This sign tell the server to execute the PHP code between these sign.


The Following is the code:  (Use spaces and tab, so the programm is easily readable for future reading/ reviewing of the code)


#################################################################
<html>
               <head>
                              A Basic PHP Programm
               </head>

               <body>
                              <?php
                                             echo "Hello.";
                               ?>
               </body>
</html>

#################################################################


The Following will be output on the browser.


#################################################################
Hello.
#################################################################


You can write PHP code various way, Two Popular way is Following:

PHP within HTML Tags:

<h1>
<?php echo "Sum of two and three is as follow:";  ?>
</h1>
<p>
<?php
echo 2+3;
?>
</p>

HTML Tags within PHP:
<?php
echo "<h1>Sum of two and three is as follow:</h1>";
echo "<p>".(2+3)."</p>";
?>



Post a Comment

  1. Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    best java training in coimbatore
    php training in coimbatore
    best php training institutes in coimbatore

    ReplyDelete
  2. Thanks for the valuable information and insights you have so provided here...
    Malaysia Public Fixed IP

    ReplyDelete
  3. Be a perfect professional at Cloud computing with the best Azure Training in Chennai from Infycle Technologies. In addition to Azure Training, grab the amazing placement guidance training with the DevOps course for the best career growth. For getting all these in one, call 7502633633 to get more.

    ReplyDelete

 
Top