What's the difference?
Printable View
What's the difference?
dunno.... I'm only aware of echo in PHP.....
:eek:
Both functions do the same but print returns TRUE on success or FALSE on failure... So, no real difference for normal use.
Aah... thanks.
I'll just stick to echo then. :)
Is there ever a case when print would fail?
I can't think of any... :D
Seems a bit pointless anyway because if print fails you can't print to the user there was an error :D Suppose you could print to a file or e-mail or something though.
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
it would return a "Absolutely"PHP Code:print IsHeStupid("RickBull");
On the other hand, if the function were to fail
there might be an error message?PHP Code:print SizeOfBrain("RickBull");
I'm only guessing here, I haven't actually tried it out.
You wouldn't know if the error is from not being able to print or not being able to return the sizeofbrain... :D
You know that frog has been pretty rude to me in recent times! :D Although I can't really say that was a rude comment, more honest than rude.
A frog on the forums?Quote:
Originally posted by Rick Bull
You know that frog has been pretty rude to me in recent times! :D Although I can't really say that was a rude comment, more honest than rude.
Riiiiight....
:eek:
ROFL :D