Your subject does not really follow your post. You can declare a variable when it is appropriate to declare a variable. You can use scoping such that a variable inside a loop or script is no longer addressable outside that scope.

See this example of using the same variable in two different scopes.

http://www.kixtart.org/ubbthreads/showthreaded.php?Cat=&Number=98486
_________________________
Home page: http://www.kixhelp.com/hb/