This is what I've got in php - it shows what I'm trying to do...
$this->$key = is_array($ATTRIBS['$key'])
? **ASSIGN THE VALUE AS AN ARRY** ATTRIBS['$key']
: $ATTRIBS['$key'];
}
Problems I can't figure out...
1. $this->$key doesn't assign the name of $key as the object property name.
2. ? ATTRIBS['$key'] has an array for the value, so what i want to do is pass that array to the object property so that $this->$key then is the same array.
Hope that clears the question up a bit.
Can anyone help?
Regan.
Code:
foreach ( $ATTRIBS as $key ) { $this->$key = is_array($ATTRIBS['$key'])
? **ASSIGN THE VALUE AS AN ARRY** ATTRIBS['$key']
: $ATTRIBS['$key'];
}
Problems I can't figure out...
1. $this->$key doesn't assign the name of $key as the object property name.
2. ? ATTRIBS['$key'] has an array for the value, so what i want to do is pass that array to the object property so that $this->$key then is the same array.
Hope that clears the question up a bit.
Can anyone help?
Regan.