[eluser]ELRafael[/eluser]
i'll try!
see this example:
Code:
class Foo
{
var $fruit;
function Foo()
{
$this->fruit = 'banana';
}
function print_fruit()
{
$fruit = 'apple';
echo $fruit.' and '.$this->fruit;
}
}
$bar = new Foo();
$bar->print_fuit(); //Show me the string "apple and banana"
When i call print_fruit method, i have 2 variables. One for all class ($this->fruit) and another ONLY for print_fruit method ($fruit).
Can you see the difference?