On Mon, 13 Sep 2004 19:06:20 +0300, Mario Lopez <[EMAIL PROTECTED]> wrote:
> Oh Thanks,
> I thought that only those variables that are defined with VAR
> will be accessible and trieted as class variables
Nope, it'll work:
#!/usr/bin/php
$v){
$obj->$k = $array[$k];
}
}
class Obj {
var $x
Oh Thanks,
I thought that only those variables that are defined with VAR
will be accessible and trieted as class variables
Mario
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 13 Sep 2004 18:26:56 +0300, Mario Lopez <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a class, but the problem is that
> its variables need to be defined dynamically.
>
> example:
>
> class class_myclass{
> var $variable1;
> var $variable2;
> var $variable3;
> ...
> var $variableN
Hi,
I have a class, but the problem is that
its variables need to be defined dynamically.
example:
class class_myclass{
var $variable1;
var $variable2;
var $variable3;
...
var $variableN
how to initialize these $variableN class variables from a global array which
contains
the variable
4 matches
Mail list logo