php3-list | 199908

[PHP3] Object Oriented PHP From: Sam Turner (squirrley5 <email protected>)
Date: 08/31/99

I am working on my first PHP project right now, and am having trouble
getting it to work the way I want it to. I am relatively new to OOP as a
whole, but I understand the basic concepts.

The main problem / question is that I know that you can use variable
variables, but can you use variable objects? I have something like this (a
lot more complicated, of course) :

class foo{
   var $Name;
};

and then in another spot in the code, I have a certain variable... for this
example, I will use $list:

$list = "Whatever";
$nm = "testing_foo";

then the trouble spot:

${$list} = new foo;
${$list}->Name = $nm;

I get a parse error on the second line of that... I would expect that if it
is not possible to declare a variable object like
${$list} = new foo;
that the error would come on that line. Any clues?

Btw, I am pretty sleepy right now, so I'm not sure that makes much sense...
if if doesn't, just email me and I'll try to explain it better in the
morning... =)

Thanks in Advance.

Sam Turner
aka Squirrley5

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>