You are here: Re: [PHP] what is -- $this variable -> $this other variable -- means? « PHP « IT news, forums, messages
Re: [PHP] what is -- $this variable -> $this other variable -- means?

Posted by Marek Kilimajer on 06/02/05 03:09

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();

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация