Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between echo and print statement?

Answers were Sorted based on User's Feedback



What is the difference between echo and print statement?..

Answer / 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

What is the difference between echo and print statement?..

Answer / guest

Both are output statements

Is This Answer Correct ?    12 Yes 2 No

What is the difference between echo and print statement?..

Answer / anz

Both are language constructs, print returns a value.

Is This Answer Correct ?    12 Yes 2 No

What is the difference between echo and print statement?..

Answer / sailabala sahoo

We can do format in print which we can’t do in echo.

Is This Answer Correct ?    6 Yes 0 No

What is the difference between echo and print statement?..

Answer / ashu_deepu

i want to add one more thing to what roshan have said.

echo does not return anything.
but print return either true or false.

Is This Answer Correct ?    6 Yes 0 No

What is the difference between echo and print statement?..

Answer / sunil kumar

echo can take multiple parameters but print cannot take
multiple parameters.The range of print is higher than
echo.Generally we use echo to print string data

Is This Answer Correct ?    5 Yes 2 No

What is the difference between echo and print statement?..

Answer / devi

echo and print both are the output statemants

Is This Answer Correct ?    3 Yes 0 No

What is the difference between echo and print statement?..

Answer / 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

What is the difference between echo and print statement?..

Answer / prabhakaran

echo accept multiply arrgument, echo give u same output,
echo doesnt return anything and it is like a tag
print always return a integer value 1.

Is This Answer Correct ?    4 Yes 4 No

What is the difference between echo and print statement?..

Answer / 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

More PHP Interview Questions

What are magic methods in php

2 Answers   Net Solution,


How to connect to a url in php?

0 Answers  


Why php is widely used?

0 Answers  


How to process the uploaded files?

0 Answers  


Do you know how to enable error reporting in php?

0 Answers  


Is it possible to get the screen resolution and like with php?

1 Answers  


What is an associative array?

0 Answers  


What is the use of strip_tags() method?

0 Answers  


Create a PHP web script with the following attributes: on start, three HTML form elements are shown: an string input field, a checkbox field, a dropdown/pull down list with 5 elements and a submit button. On submission, the form should be redisplayed (while remaining all options/inputs as the user has selected/entered them). Additionally, the selections/inputs of the user should be displayed in text. Please solve this without the use of any external libraries.

1 Answers   Wipro,


Why php is used with mysql?

0 Answers  


Write down the code for saving an uploaded file in PHP.

0 Answers  


What is the $_ server php_self variable?

0 Answers  


Categories