Intro to php, print and echo
// To use php
download xampp server, go to opt/lampp/htdocs
download xampp server, go to opt/lampp/htdocs
delete all file inside and make index.php file
run apache server.
// Print and echo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
echo "This is the php fil <br>";
print "This is the php another file<br>";
// Both echo and print are same.
// echo is a bit faster than print
print 12;
// Integer need not to put inside the double quote
echo 10+5; // Can do math function easily
?>
</body>
</html>
Comments
Post a Comment