Hi,
I'm having trouble using an argument from my class in one of that class's functions.
I have a class called company:
class company {
var $name;
function __construct($name) {
echo $name;
}
function name() {
echo $name;
}
}
$comp = new company('TheNameOfSomething');
$comp->name();
When I instantiate it (second to last line), the construct magic method works fine, and echos out "TheNameOfSomething." However, when I call the name() function, I get nothing.
What am I doing wrong? Any help is greatly appreciated. If you need any other info, just ask!
Thanks
-Giles
http://gilesvangruisen.com/