What is the difference between echo and print statement?

Answer Posted / roshan

echo can take multiple arguments separated by comma whereas print can take one single argument.

echo $x,$y,$z;//This is valid
//print $x,$y; This is invalid
print $x; //This is valid.

Is This Answer Correct ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are psrs? Choose 1 and briefly describe it?

919


How do I install php?

575


What is the best practice for running mysql queries in php? Consider the risk of sql injection.

529


How to create a web form?

521


What is rest api in php?

494






How to get the ip address of the client?

8681


What is difference between html and php?

484


What is a http session?

523


Do you know what is the difference between the include() and require() functions?

491


How many types of php frameworks are there?

473


What is php data type?

500


What does the expression exception::__tostring means?

538


What is the difference between overloading and overriding in php?

515


What is php full form?

537


What is full form of PHP?

589