Results 1 to 4 of 4

Thread: What is Echo? What is the difference between Echo and Print statement in PHP?

  1. #1
    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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    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.

Similar Threads

  1. Need to know about Kyocera Echo
    By Corwinn in forum Portable Devices
    Replies: 4
    Last Post: 15-02-2011, 05:35 PM
  2. Information on php echo
    By Rebeccak in forum Software Development
    Replies: 3
    Last Post: 07-07-2009, 09:56 AM
  3. How To Use Echo statement in PHP
    By Pikachoo in forum Software Development
    Replies: 2
    Last Post: 18-03-2009, 08:31 AM
  4. Set colors in echo
    By revolucioncg in forum Software Development
    Replies: 3
    Last Post: 14-02-2009, 09:53 PM
  5. Sound has an echo
    By Tominfl in forum Windows Software
    Replies: 2
    Last Post: 15-09-2008, 04:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,660,884,137.47349 seconds with 17 queries