[nycphp-talk] Pt III: Variables, functions, classes, methods, confused!
Henry Ponce
henry at beewh.com
Wed Oct 15 13:14:17 EDT 2003
class MyClass {
var $monthVar;
function MyClass($monthVar){
$this->monthVar = $monthVar;
}
function myFunction() {
echo $this->monthVar;
}
}
Then you can do this:
> 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?
--
An. Henry Ponce
Linux Registered User # 303567
NY
More information about the talk
mailing list