PHP Program how to print string and variable both using print


php source-


<!DOCTYPE html>
<html>
<body>

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

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


</body>
</html>

output-

Learn PHP

Study PHP at W3Schools.com
9

0 comments:

Post a Comment

My Instagram