PHP - Hello World With Variables


SUBMITTED BY: KkK1337

DATE: June 27, 2017, 2:19 a.m.

FORMAT: PHP

SIZE: 392 Bytes

HITS: 408

  1. <?php
  2. // Declare the variable 'string' and assign it a value.
  3. // The <br> is the HTML equivalent to a new line.
  4. $string = 'Hello World!<br>';
  5. // You can echo the variable, similar to the way you would echo a string.
  6. echo $string;
  7. // You could also use print.
  8. print $string;
  9. // Or, if you are familiar with C, printf can be used too.
  10. printf('%s', $string);
  11. ?>

comments powered by Disqus