echo and print statement in php |
In PHP there are two way to get output that are echo and print.
In this article we will learn how to use echo and print statement in PHP. echo and print statement is walking similar in PHP.
Difference between echo and print statement:
- Echo does not return value while print return value of 1
- Eco does not used in expression while print use in expression because print returns value.
- Echo can take multiple parameters while print can take only one parameter.
- Echo is faster than print.
Both echo and print can be used with or without parameter.
Syntax of echo and print:
<?
echo "Any string you want as output";
// or,
echo("Any string you want as output");
?>
<?
print "Any string you want as output";
// or,
print("Any string you want as output");
?>
PHP Variables
Learn More in PHP
---
I hope you likable this nice post. Do not forget to share it together with your friends, the Sharing Button is below the post. Apart from this, if there's any downside within the intermediate, don't hesitate to request the Comment Box. we are going to be happy to help you.
I will continue to write more and more on this blog, so do not forget to make our blog BlogLearner as a bookmark (Ctrl + D) on your mobile or computer and subscribe to us to get all the posts in your email. Do not forget to share these posts, if you like it. You can facilitate us reach additional individuals by sharing it on social networking sites like Facebook or Twitter.
PHP with examples |
No comments:
Post a Comment