0ocp7w
Last Updated: October 13, 2016
·
152
· gadecosmetics
Gade cosmetics

PHP 5 echo and print Statements

1.Example
<?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
?>

2.Example
<?php
$txt1 = "Learn PHP";
$txt2 = "W3Schools.com";
$x = 5;
$y = 4;

echo "<h2>$txt1</h2>";
echo "Study PHP at $txt2<br>";
echo $x + $y;
?>

3.Example
<?php
print "<h2>PHP is Fun!</h2>";
print "Hello world!<br>";
print "I'm about to learn PHP!";
?>

4.Example
<?php
$txt1 = "Learn PHP";
$txt2 = "www.gadecosmetics.se";
$x = 5;
$y = 4;

print "<h2>$txt1</h2>";
print "Study PHP at $txt2<br>";
print $x + $y;
?>

Say Thanks
Respond

1 Response
Add your response

28238

And ?

over 1 year ago ·