Hello,
I want to know what it is that in PHP object syntax:
public function myMethod($data) {
foreach ($data as $attribute => $value)
{
[B]$method[/B] = 'set'.ucfirst($attribute);
if (is_callable(array($this, $method)))
{
[B]$this->$method($value); [/B]
}
}
}
So I wonder what is the syntax $ this->$ method
Why not do the same without the operator $ this->.
What are the advantages of this syntax?
Can you explain?
thank you