[nycphp-talk] Pt III: Variables, functions, classes, methods, confused!
soazine at pop.erols.com
soazine at pop.erols.com
Wed Oct 15 14:06:20 EDT 2003
class MyClass {
var $monthVar;
function MyClass($monthVar = '') {
$this->monthVar = $monthVar;
...
}
...
function myFunction() {
global ${$this->monthVar};
...
}
}
I have a variable called $graduation_month that I am putting into the class
as $myClass = new MyClass('graduation_month'); and then I would have the
variable name's value in myFunction, right?
Basically, I don't.. I don't know what I did wrong.
Phil
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
More information about the talk
mailing list