Thursday, November 19
Trending
- US Outages Explained: What Happened to Microsoft, FAA and Banks
- Microsoft 365 Outage: Outlook, Teams and Copilot Down. What We Know
- Diwali Online Shopping Scams 2026: 10 Ways to Stay Safe
- 10 Best DDoS Protection Services for 2027
- 12 Best Web Application Firewalls (WAF) for 2027
- Best Ethical Hacking Tools in 2027: Free & Paid Picks
- Software supply chain attacks 2026: Timeline and developer checklist
- Binance Hack: $6.3 Billion Drained in the Largest Crypto Theft Ever. What We Know So Far
There are two ways to get the output in PHP:
- echo
The basic difference between echo and print: echo has no return value while print has a return value of 1 so it can be used in expressions.
echo Statement
The echo statement may be used with or without parentheses: echo or echo().
Example:
<?php
echo "Hello world!
";
echo "I'm learning a PHP Programming!
";
?>
print Statement
The print statement may be used with or without parentheses: print or print().
Example:
<?php
print "Hello world!
";
print "I'm learning PHP Programming!";
?>



