Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-14-2004, 06:58 PM   #1 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Epsilon is on a distinguished road
print vs. echo

Is there really any difference between print and echo?. Say, for example, when printing out a bunch of HTML to the web browser. Any particular reason to use one over the other?
__________________
--Epsilon--
Epsilon is offline   Reply With Quote
Old 09-14-2004, 07:02 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
good question .. u don't need () with echo?
__________________
Mike
sde is offline   Reply With Quote
Old 09-14-2004, 07:07 PM   #3 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Epsilon is on a distinguished road
I use both of them pretty regularly and I never use the parenthesis for either. For some reason I've just always been in the habit of using 'print' for longer lines and 'echo' for short ones, especially if I just need to print a variable.

But as I got to thinking about it, I'm not sure why I ever developed that habit, as it seems to me that they are completely interchangable?
__________________
--Epsilon--
Epsilon is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print sureshkumar_kc MS Technologies ( ASP, VB, C#, .NET ) 1 10-15-2004 02:19 AM
what language is this? sde All Other Coding Languages 10 05-25-2004 03:57 PM
i have a child window which i want to print at the same time hiding plz help deepanakr HTML, XML, Javascript, AJAX 0 05-10-2004 10:08 PM
Print window Belisarius HTML, XML, Javascript, AJAX 1 08-05-2003 04:42 AM
Help with echo. Yes, I said "echo". rockyracoon All Other Coding Languages 4 07-10-2002 01:50 PM


All times are GMT -8. The time now is 01:50 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting