Re: What's the difference between echo and print?

From: Date: Mon, 06 Aug 2001 21:31:36 +0000
Subject: Re: What's the difference between echo and print?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61498@lists.php.net to get a copy of this message
on 8/6/01 12:32 PM, Phil Latio at phil.latio@f-in-stupid.co.uk 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

« previous php.general (#61498) next »