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

Is array empty php?

496


What is the difference between static and dynamic websites?

495


What does $globals means?

520


What is the use of 'print' in php?

543


What is warning – “cannot modify header information – headers already sent”?

619






Php program to generate fibonacci series?

539


How to create a web form?

541


What is php oop?

507


Write a program to get second highest number in an array using php?

526


What advance thing in php7?

514


Tell me what is the use of explode() function?

538


How to connect to a url in php?

508


How to run a php script?

566


What are the different loops in php?

531


What does the scope of variables mean?

525