PHP   59
Setting Variables
Guest on 25th April 2022 01:20:20 AM


  1. <html>
  2. <head>
  3. <title>hello world</title>
  4. </head>
  5. <body>
  6.  
  7. <?php
  8.  
  9.    // Setting Variables
  10.  
  11.    $txt1="Hello World!";
  12.    $txt2="What a nice day!";
  13.  
  14.    // Methods of Displaying Variable Values...
  15.  
  16.    echo "Using echo statment:<br />";
  17.    echo "\$txt1 is: " . $txt1 . "<br />";
  18.    echo "\$txt2 is: " . $txt2;
  19.  
  20.    // Notice how <br /> is used... can use other tags as well...
  21.  
  22.  
  23. ?>
  24.  
  25. </body>
  26. </html>

Raw Paste

Login or Register to edit or fork this paste. It's free.