on 8/6/01 12:32 PM, Phil Latio at [EMAIL PROTECTED] wrote:
> What's the difference between echo and print?
this is definitely one of those frequently asked ones :)
a good place to start is
http://php.net/echo
http://php.net/print
http://php.net/printf
for info and user comments. i found a couple cool nuggets in there. here are
some things i believe are true.
print() is a function and you need the parantheses. print also returns
whether or not is was successful, as in
if (print($thing)) {
$thing_was_printed = 1;
} else {
$thing_was_printed = 0;
}
echo is not a function. it is a language construct. (i'm not sure of all the
implications of this) also, you do not need parantheses. so,
echo $thing;
is valid.
-- mike cullerton
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]