Page 1 of 1

Print and Echo

Posted: Mon Jun 23, 2003 6:48 am
by Zeceer
I've heard that print is a function and echo is a commando, but is there any reasons for why using echo in some situations, while useing print in other? What is really the difference between them?

Posted: Mon Jun 23, 2003 7:09 am
by twigletmac
print() returns a value whereas echo() does not. Other than that there's no difference. Which you use is down to personal preference, I use echo() cause it's got one less character to type.

Mac

Posted: Mon Jun 23, 2003 8:58 am
by volka
..and can take more than one argument ;)