Re: what is -- $this variable -> $this other variable -- means?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Davey wrote:
Hello Marek,

Wednesday, June 1, 2005, 9:48:36 PM, you wrote:


What does
$this variable -> $this other variable
Means?


MK> read about variable variables

Wouldn't that be $$variable? :)

It looks like an object method request to me.


I thought this was covered in that section too :)

I didn't find where it's fully documented, but it's similar:

class A {
	var $variable = "I'm objects's variable\n";
	function method() {
		echo "I'm object's method\n";
	}
}

$a = new A;

$var = 'variable';
echo $a->$var;

$meth = 'method';
echo $a->$meth();

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux