What is the difference between echo and print statement?

Answer Posted / santha

s there any difference between print and echo in PHP? If so, which should I use and when? If not, why are there two keywords?

UPDATE :

At the downvoters : please read the SO faq. SO was setup also to capture googleable questions. so you shouldn't downvote for that, this question is a valid question, answered on a lot of places and now on SO too.

Of course you can downvote for another reason, but please leave a comment in the lines of -1 : downvoted for .. , cause for now, I'm not understanding the downvotes.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the importance of the function htmlentities.

544


What is laracast?

587


What is the use of is_array() and in_array()?

545


What is the difference between explode and split?

496


How escape single quotes php?

490






How do I run php?

536


What is php explain how php works?

529


What are the uses of explode() function?

561


Which is variable cost?

530


What is encapsulation in php?

564


How can we change the maximum size of the files to be uploaded?

516


What does mysqli_query return?

523


Which method removes the last element from the end of an array?

499


When should you use a stored procedure?

509


Is laravel better than codeigniter?

554