Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
PHP - Hello World With Variables
SUBMITTED BY:
KkK1337
DATE:
June 27, 2017, 2:19 a.m.
FORMAT:
PHP
SIZE:
392 Bytes
Raw
Download
Tweet
HITS:
408
Go to comments
Report
<?php
// Declare the variable 'string' and assign it a value.
// The <br> is the HTML equivalent to a new line.
$string
=
'Hello World!<br>'
;
// You can echo the variable, similar to the way you would echo a string.
echo
$string
;
// You could also use print.
print
$string
;
// Or, if you are familiar with C, printf can be used too.
printf
(
'%s'
,
$string
);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus