Posted by kenoli on 11/06/06 15:38
I'm running into problems related to scope and am wondering if anyone
knows of a good article or resource discussing it.
I've ended up just making variables global a lot, which works,
generally, but which I am told is not good practice.
The kind of things that are perplexing me are things like:
1. Passing a variable to a function that is in an include file and
then getting a variable back that is generated by that function for use
in the originating script.
2. Exactly what using "return" in a function does regarding scope.
Sometimes it doesn't seem to actually make the "returned" variable
available where I want to use it.
Any ideas for dealing with scope issues would be appreciated.
--Kenoli
Navigation:
[Reply to this message]
|