its basically used as a way to easily display information about whats going on in your script, you can use it for bug finding by backtracing
lets say you expect a variable to be a certain number
and your script doesn't work as you planned
so you print your variable, and see that that variable isn't the number you expected, you can then try and figure out what could cause it to be the number that it currently is, and when you know why it isn't what you excepted, you can find a way to change it to become what you expected originally. |