Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 05-09-2009
Member
 
Join Date: Feb 2009
Posts: 78
What is Echo? What is the difference between Echo and Print statement in PHP?

Can anyone tell me the difference between the Echo and Print statement in PHP, when these functions should be used in programming.
Reply With Quote
  #2  
Old 05-09-2009
Member
 
Join Date: Jan 2006
Posts: 6,878
Re: What is Echo? What is the difference between Echo and Print statement in PHP?

Both are output statements, Both are language constructs, print returns a value. require parenthesis. echo accept multiply argument, echo give u same output, echo doesn't return anything and it is like a tag print always return a integer value 1.
Reply With Quote
  #3  
Old 05-09-2009
Member
 
Join Date: Dec 2008
Posts: 161
Re: What is Echo? What is the difference between Echo and Print statement in PHP?

echo accept multiply argument, echo give u same output, echo doesn't return anything and it is like a tag print always return a integer value 1. Print return true or false based on success or failure whereas echo just does what its told without letting you know whether or not it worked properly. echo is basically what is going to be said, the bracket is the t-string, then the opening speech marks are what is going to be said in the echo.
Reply With Quote
  #4  
Old 05-09-2009
Member
 
Join Date: Mar 2008
Posts: 192
Re: What is Echo? What is the difference between Echo and Print statement in PHP?

Print() acts like a function in that it returns a value and can be used in complex expressions. echo and print are both language constructs and do not (and should not) require parenthesis. echo accept multiply argument, echo give u same output, echo doesn't return anything and it is like a tag print always return a integer value 1. echo() can take multiple expressions,Print cannot take multiple expressions. echo has the slight performance advantage because it doesn't have a return value.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is Echo? What is the difference between Echo and Print statement in PHP?"
Thread Thread Starter Forum Replies Last Post
Need to know about Kyocera Echo Corwinn Portable Devices 4 15-02-2011 05:35 PM
Information on php echo Rebeccak Software Development 3 07-07-2009 09:56 AM
How To Use Echo statement in PHP Pikachoo Software Development 2 18-03-2009 08:31 AM
Set colors in echo revolucioncg Software Development 3 14-02-2009 09:53 PM
Sound has an echo Tominfl Windows Software 2 15-09-2008 04:35 AM


All times are GMT +5.5. The time now is 12:53 PM.