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 would occur if a fatal error was thrown in your php program?

545


Which is best framework for php?

565


Does php have a future?

514


What is the difference between $message and $$message in php?

430


How do I clear my browser session?

518






What is variable give example?

562


Declare a new variable in php equal to the number 3;

514


What is smarty?

510


What are the types of variables in php?

543


What are the functions to be used to get the image's properties (size, width and height)?

550


Tell me how do you define a constant?

526


Who created numbers?

536


What does the array operator '===' means?

557


Which library is used in php to do various types of image work?

520


What is php session id?

532