Question re: Classes & Functions
Posted: Mon Aug 04, 2008 10:06 pm
Hey everyone. I am learning to use classes.
I have run into a confusion -
Look at this breakdown:
***** PLEASE USE THE
----
This is a really simplified example to show the structure. My question is, when I call the Function A in Function B, do I need to do it some other way than the way a regular function is called? I am not sure about this.
Thanks.
I have run into a confusion -
Look at this breakdown:
***** PLEASE USE THE
Code: Select all
TAG *****[/color]Code: Select all
class MyClass{
function functionA{
do this;
return that;
}
function functionB($variable){
$apple = functionA($variable);
$apple .= '123';
return $apple;
}
}This is a really simplified example to show the structure. My question is, when I call the Function A in Function B, do I need to do it some other way than the way a regular function is called? I am not sure about this.
Thanks.