Can you make contactType as associative array so you can do... $GLOBALS["format"]->contactTypes[$contact->contactType]
Or an object so you can do something like... $GLOBALS["format"]->contactTypes->getType($contact->contactType) -----Original Message----- From: Martin Martinov [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2008 10:33 AM To: MarkDNA Cc: [email protected] Subject: Re: [fw-general] Minor annoyance - Using an object member with another object member 2008/10/30 MarkDNA <[EMAIL PROTECTED]>: > > I have a sneaking suspicion that I'm missing an obvious fix here. I'm trying > to construct something like this: > > $GLOBALS["format"]->contactType->$contact->contactType > > Where $contact is a Zend_Db_Row object and $GLOBALS["format"] is a > Zend_Config object. Now I KNOW that the above construction will never work > because $contact is an object and the interpreter is looking for a string. > What I'm wondering is if there is a language construction or simple function > to get $contact->contactType to evaluate first? Creating little toss-off > vars to take care of this is getting annoying :-) > > -Mark > > ----- > Mark Garrett > DailyDNA > Arkadelphia, AR > (Telecommuting to: Rogue River, OR) > -- > View this message in context: > http://www.nabble.com/Minor-annoyance---Using-an-object-member-with-another-object-member-tp20248055p20248055.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > Have you tried $GLOBALS["format"]->contactType->{$contact->contactType} ? -- Regards, Martin Martinov http://mmartinov.com/
