Advertisement
ini_PlayeR

5_PHP INTRODUCTION

Mar 9th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title>Name it with your title</title>
  4.     <head>
  5.     <body>
  6.         Name it with your content of HTML<br><br> <!--HTML code goes here-->
  7.  
  8.         <?php
  9.         echo("This is the PHP section<br>"); //PHP code goes here
  10.         //This is single line comment in PHP
  11.         /*This is more than single
  12.         line comment in PHP*/
  13.         $a=1;
  14.         $b=2;
  15.         $c=$a+$b;//"$" defines a variable
  16.         $d=Hi;
  17.         echo("$d<br>");
  18.         $e=$d+$c;//string will defines "0"
  19.         echo("$e<br>");
  20.  
  21.         echo("<br>$b<br>");
  22.         echo("$c<br><br>");
  23.  
  24.         for($d=1;$d<=5;$d++)
  25.         echo"$d. Hello word<br>";
  26.  
  27.         for($d=5;$d>=1;$d--)
  28.         echo"<br>$d. Hi World";
  29.  
  30.         echo("<font color=\"darkgreen\"><br><br>The date <br></font>");//you can add the color with text
  31.         echo date("<br><br>d-m-y H:i:s"); //line break in echo date is doesn't matter
  32.         echo("<font color=\"00FF00\"><br>The other date <br></font>");//or you can add the color tag with hex
  33.         echo date("D-M-Y H:i:s");
  34.         ?>
  35.  
  36.     <br><br>This is the HTML section<br>
  37.     <?php
  38.     echo("And of course this is the PHP section");
  39.     ?>
  40.     </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement