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

What is the difference between unset and unlink?

540


What is inheritance in php?

581


Tell me how can we check the value of a given variable is alphanumeric?

497


Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()

1823


Explain about the connective abilities of the PHP?

602






What is composer used for?

516


Explain the three different kinds of Arrays?

657


Which php framework is best?

542


How to Retrieve the Session ID of the Current Session?

534


What is the functionality of the functions strstr() and stristr()?

529


Explain briefly about a search-friendly site looks like?

495


What is inheritance in php? How many types of inheritance supports php?

535


What is php explain how php works?

529


Which variable declarations within a class is invalid in php?

510


Which is better php praogramming or cad/cam scope wise and also salaray wise?

1575