I'm not sure when it's propper to use
echo and when to use print. Can you
guys give me an idea?
In my experience, it's mostly been personal preference, with no major differences between the two.
This works to my advantage, however, as I've differentiated between the two in a little coding standard of my own:
- I use "print" for normal printing of text
- I use "echo" for debugging purposes, like spitting out variables in the middle of a script, etc.
This way, when I debug something, I can put echo statements all over the script, and when I'm done, just search for the echo statements and remove every one that I find.