1. Home
  2. Computing & Technology
  3. PHP / MySQL

Readers Respond: Do you use Print or Echo in your PHP scripts?
Responses: 40

By Angela Bradley, About.com

For the most part Print and Echo do the same thing. Which do you choose to use in your PHP programs? Why is this your choice? Share your answers with our readers! Tell Us Why

echo

because its awesome and print sucks ( 5 chars compared to 4)
—Guest david

Echo Always....

Hi All, I use always echo only.... As it is faster than print... Coooool.....
—Guest Muruganantham

Echo

I use Echo, because she is hot in the Dollhouse. ;) And, it's only 4 characters so if you use it a lot, it saves keystrokes.
—Guest Jack

Echo

Echo because it doesn't return any bool value, it just writes your information. It's simple, faster and I use and recomend.
—Guest Vinícius Barros

echo()

When I started to learn PHP back in my college years, we were taught to use echo().
—Guest Andrew_G

Echo

Echo Echo Echo - I always use echo. Echo is faster than Print.
—Guest tartis

echo!

For consistency, I only use the echo statement in my scripts. There is no particular reason for me to prefer echo over print. Echo does allow me to cascade the expressions I want to echo by separating them with commas -- you cannot do this with print statement: echo "a", "b", "c", 1, 2, 3; This link provides some useful information: http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40
—schwarzenneger

Print for me! ...or, maybe not?

I learned C and C++, as well as C# before this, so I've always used print, but since I learned DOS, I've also used echo...so, maybe not.
—Wolfys

Do you use Echo or Print?

Echo - That is what I am used to seeing when I try to read the code.
—Guest Deb

Echo

i use echo sinse i mainly do text pages and echo is faster than print
—Guest engel

Echo

Well i saw both when learning php but the PRINT looks kinda Print like normal but echo looks more like a language so my answer is simple. $answer='Echo is better'; $fake='Print Bad'; $name='Wadjahost'; $all="$answer.$fake.$name"; echo "$all"; i think it would be nice for php to be liek this but all same ECHo rules Print Slower......... ( In serious programming i remember Print though )
—Guest wadjahost

Echo

Well i saw both when learning php but the PRINT looks kinda Print like normal but echo looks more like a language so my answer is simple. $answer='Echo is better'; $fake='Print Bad'; $name='Wadjahost'; $all="$answer.$fake.$name"; echo "$all"; i think it would be nice for php to be liek this but all same ECHo rules Print Slower......... ( In serious programming i remember Print though )
—Guest wadjahost

php and echo

php and echo used for print the message. print is a method.it is slower.it take extra time to call. echo is command .it perform the dislpay the message fast.
—Guest atul

Echo for me

I'm using Echo when coding because i was learned Echo first .
—Guest Mạnh Hà

echo only

I use echo only to print something I think it is common.
—Guest salman

Tell Us Why

Do you use Print or Echo in your PHP scripts?

Receive a one-time notification when your response is published.

Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. Learn PHP
  5. Print vs Echo - Do you use Print or Echo?>

©2009 About.com, a part of The New York Times Company.

All rights reserved.