Re: echo or print

From: Date: Thu, 20 Nov 2003 14:47:56 +0000
Subject: Re: echo or print
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170422@lists.php.net to get a copy of this message
Hi, Friday, November 21, 2003, 12:37:50 AM, you wrote: JF> when should i use echo ' '; vs. print ' '; JF> ================================================ JF> Jay Fitzgerald, Design Director JF> - Certified Professional Webmaster (CPW-A) JF> - Certified Professional Web Designer (CPWDS-A) JF> - Certified Professional Web Developer (CPWDV-A) JF> - Certified E-Commerce Manager (CECM-A) JF> - Certified Small Business Web Consultant (CWCSB-A) JF> Bayou Internet - http://www.bayou.com JF> Toll Free: 888.30.BAYOU (22968) JF> Vox: 318.338.2034 / Fax: 318.338.2506 JF> E-Mail: jayfitz@bayou.com JF> ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf JF> ================================================ There is no real difference in common usage, print returns true always so you can use it in weird situations otherwise echo is a tiny bit faster. You can do stuff like this if(isset($_GET['name'] && print('DEBUG: received name set to '.$_GET['name']."<br>\n")){ //normal processing here } -- regards, Tom

« previous php.general (#170422) next »