Results 1 to 14 of 14

Thread: echo, print

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    echo, print

    What's the difference?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    dunno.... I'm only aware of echo in PHP.....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

  4. #4
    Junior Member
    Join Date
    Jan 2003
    Location
    Netherlands
    Posts
    27
    Both functions do the same but print returns TRUE on success or FALSE on failure... So, no real difference for normal use.

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Aah... thanks.

    I'll just stick to echo then.

  6. #6
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Is there ever a case when print would fail?

  7. #7
    Junior Member
    Join Date
    Jan 2003
    Location
    Netherlands
    Posts
    27
    I can't think of any...

  8. #8
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Seems a bit pointless anyway because if print fails you can't print to the user there was an error Suppose you could print to a file or e-mail or something though.

  9. #9

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    I'm new to PHP, but I'm guessing that the print can fail if the value it is to print is erroneous.

    For example, if there were a function that returns a value, and we do a

    PHP Code:
    print IsHeStupid("RickBull"); 
    it would return a "Absolutely"

    On the other hand, if the function were to fail

    PHP Code:
    print SizeOfBrain("RickBull"); 
    there might be an error message?

    I'm only guessing here, I haven't actually tried it out.

  10. #10
    Junior Member
    Join Date
    Jan 2003
    Location
    Netherlands
    Posts
    27
    You wouldn't know if the error is from not being able to print or not being able to return the sizeofbrain...

  11. #11
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You know that frog has been pretty rude to me in recent times! Although I can't really say that was a rude comment, more honest than rude.

  12. #12

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by Rick Bull
    You know that frog has been pretty rude to me in recent times! Although I can't really say that was a rude comment, more honest than rude.
    A frog on the forums?

    Riiiiight....

    Last edited by mendhak; Jan 18th, 2003 at 02:07 PM.

  13. #13

  14. #14

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Talking

    ROFL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width