Re: Echo and Print

From: Date: Fri, 26 Jan 2001 18:46:59 +0000
Subject: Re: Echo and Print
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36843@lists.php.net to get a copy of this message
> print is a function where u can add html tags like > print("<br><b> hello $name") however echo is a command where we > can't > include html tags ! echo "hello".$name This is VERY incorrect, please read this : > >What is the difference between echo and print ? > >----------------------------------------------------------- > >http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/41 And then try this : $name = 'fred'; echo "<br><b>$name</b><br>" . $name; print "<br><b>$name</b><br>" . $name Then try this : echo 'sup','yo'; print 'sup','yo'; // Parse error! But that FAQ explains it better then I can so ... Philip > >On 26 xxx -1 php4@mailbr.com.br wrote: > > > > > I know it is a kind of stupid question but I was trying to figure out > > > the difference between "Echo" and "Print" and I didn't find > > > it...Could > > > anybody explain that to me?? > > > Thank you > > > > > > Felipe Lopes

« previous php.general (#36843) next »