In php with the help of echo function multiple string are display at a time. on the other hand with the help of print function single string is displayed at a time. below is the code for better understanding.
<html>
<head>
<meta charset="utf-8">
<title>First page</title>
</head>
<body>
<?php
$string = "<h1>hello world in php</h1>";
echo $string; // echo function is fast and used with multiple string at a time.
echo "my name", "is", "awais";
//print "my name", "is", "awais"; print func is used with 1 string at a time.
?>
</body>
</html>
0 Comments