GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  PHP
Go To First  |  Previous Question  |  Next Question 
 PHP  |  Question 22 of 74    Print  
What is the difference between echo and print?
If anyboyd knows, do tell me.
waiting for your prompt response.



  
Total Answers and Comments: 19 Last Update: September 07, 2009     Asked by: Ashwani 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: maurani
 
echo() can take multiple expression bt print() cant

Above answer was rated as good by the following members:
sandep_dcte
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
September 28, 2006 05:20:01   #1  
Venu Gopal.M        

RE: What is the difference between echo and print?

Hi

echo is a construct.echo takes multiple parameters

print is also a construct but print does not take multiple parameters


 
Is this answer useful? Yes | No
October 04, 2006 02:18:05   #2  
Ramesh        

RE: What is the difference between echo and print?

Hi

echo :-

- Is a command only.

- Faster than Print.

print

-


 
Is this answer useful? Yes | No
October 04, 2006 02:19:49   #3  
Ramesh        

RE: What is the difference between echo and print?

Hi

echo:-

- Is a command only.

- Faster than print

print:-

- Is a function.

- It will return true(1) or false(0) or some values.


 
Is this answer useful? Yes | No
October 12, 2006 10:03:07   #4  
Mahendra Choudhary        

RE: What is the difference between echo and print?

Main difference between echo() and print() is that echo is just an statement not a function and doesn't return's value or it just prints a value whereas print() is an function which prints a value and also it returns value.


 
Is this answer useful? Yes | No
November 02, 2006 02:26:52   #5  
rashmi        

RE: What is the difference between echo and print?
echo is a statement and print is a function.
 
Is this answer useful? Yes | No
November 04, 2006 04:37:28   #6  
Bhupal        

RE: What is the difference between echo and print?
Echo and Print are used for the same functionality printing of data.But there is echo is not a function we cannot pass arguments where as print is a function we can pass arguments .Thank you Bye.
 
Is this answer useful? Yes | No
November 09, 2006 03:32:22   #7  
anas        

RE: What is the difference between echo and print?
hi .i am anas.i am also preparing for PHP.basically diff. of echo and print is echo have multiple arguments and in print function have only one argument.
 
Is this answer useful? Yes | No
December 13, 2006 12:05:22   #8  
Mohamed        

RE: What is the difference between echo and print?
echo is a statement an does not return valueprint is a function and returns value
 
Is this answer useful? Yes | No
December 15, 2006 03:59:06   #9  
ankita        

RE: What is the difference between echo and print?
print can be used as part of a more complex expression where echo cannot.echo is marginally faster since it doesn't set a return value.
 
Is this answer useful? Yes | No
December 21, 2006 00:10:54   #10  
Raj        

RE: What is the difference between echo and print?

echo : just output the content

print : it returns true for successful output and false for unsuccessful


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape