Display strings and variables with the echo command


SUBMITTED BY: henry1874w

DATE: June 4, 2017, 8:03 p.m.

FORMAT: Text only

SIZE: 219 Bytes

HITS: 281

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $txt1 = "Learn PHP";
  6. $txt2 = "W3Schools.com";
  7. $x = 5;
  8. $y = 4;
  9. echo "<h2>" . $txt1 . "</h2>";
  10. echo "Study PHP at " . $txt2 . "<br>";
  11. echo $x + $y;
  12. ?>
  13. </body>
  14. </html>

comments powered by Disqus