write a simple PHP program that displays some text on screen??
Answers
Answered by
1
Using echo function<!DOCTYPE HTML><html><head> <?php $my_string = 'Code to display text'; echo $my_string;?> </head></html>
2. Using print() function
<!DOCTYPE HTML><html><head> <?php $my_string = 'Code to display text'; print $my_string;?> </head></html>But it is considered to use echo function rather than print because run time of print function is slightly more than that of echo function .
I hope this helps.
Happy coding :)
Answered by
1
<html>
<head>
<title>Typing using PHP </title>
<body>
<?php
echo "How are you my friend?";
?>
</body>
</html>
HOPE THIS HELPS :)
<head>
<title>Typing using PHP </title>
<body>
<?php
echo "How are you my friend?";
?>
</body>
</html>
HOPE THIS HELPS :)
Similar questions