Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Re: [ryel01] Conver this perl to php?

Quote Reply
Re: [ryel01] Conver this perl to php? In reply to
This is what I've got in php - it shows what I'm trying to do...

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.
Subject Author Views Date
Thread Conver this perl to php? ryel01 6858 Nov 8, 2005, 6:15 PM
Thread Re: [ryel01] Conver this perl to php?
ryel01 6718 Nov 8, 2005, 11:04 PM
Post Re: [ryel01] Conver this perl to php?
ryel01 6704 Nov 10, 2005, 10:56 PM