Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

PHP Example


It is very easy to create a simple PHP example. To do so, create a file and write HTML tags + PHP code and save this file with .php extension.

All PHP code goes between php tag. A syntax of PHP tag is given below:

  1. <?php
  2. //your code here
  3. ?>

Let’s see a simple PHP example where we are writing some text using PHP echo command.

File: first.php

  1. <!DOCTYPE>
  2. <html>
  3. <body>
  4. <?php
  5. echo “<h2>Hello First PHP</h2>“;
  6. ?>
  7. </body>
  8. </html>

Output:

Hello First PHP

Comments

comments