PHP Echo / Print

PHP echo and print Statements

In PHP you can get output with two basic sources and these ways are echo and print. They both are almost same there is no return value for echo but there is value of 1 for print. Echo is faster than print therefore almost all php programmers use echo.

PHP echo Statement

You can use PHP echo statement with or without parentheses like
echo or echo()
Most important echo can take multiple more than one parameter.
In this following example you can see how you can get output on browser as plain html with php echo statement.

echo “<h2>Learn Easy Code</h2>”;
echo “Hello world!<br>”;
echo “PHP is easy to learn”;

By |2017-11-05T10:40:16+00:00May 23rd, 2016|Uncategorized|Comments Off on PHP Echo / Print

About the Author:

I have professional 10 years experience in Web Development, Web Designing, Graphics Designing, Video Editing & Composition, Search Engine Optimization, Mobile Application Development, Social Media Marketing and Digital Media Marketing.