What is the difference between echo and print statement?

Answer Posted / hari

There is a slight difference between print and echo which
would depend on how you want to use
the outcome. Using the print method can return a true/false
value. This may be helpful during a
script execution of somesort. Echo does not return a value,
but has been considered as a faster
executed command. All this can get into a rather complicated
discussion, so for now, you can
just use whichever one you prefer

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long will it take to learn php?

500


Tell me what is mean by an associative array?

516


What is the main difference between require() and require_once()?

507


Can you give example for trait in php?

531


How to create database connection and query in php?

564






What is the difference between null and empty?

565


"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.

1519


How are cookies created?

536


Php program to generate fibonacci series?

539


What is a string in php?

540


Tell me what are magic methods?

526


How come the code works, but does not for two-dimensional array of mine?

491


Explain me how failures in execution are handled with include() and require() functions?

600


How do I get csrf token?

545


What is c++ polymorphism?

517