RE: [PHP] getting values from objects

From: Date: Wed, 02 Apr 2003 13:05:01 +0000
Subject: RE: [PHP] getting values from objects
Groups: php.general 
Request: Send a blank email to php-general+get-141978@lists.php.net to get a copy of this message
> -----Original Message----- > From: Charles Kline [mailto:ckline@rightcode.net] > Sent: 01 April 2003 21:21 > To: Dan Joseph > Cc: php-general@lists.php.net > Subject: Re: [PHP] getting values from objects > > > My objective was to try and NOT use a temporary variable. > > for example I can do this: > > foreach ($res_pform->getSubmitValue("investigator5") AS $k=>$v){ > echo $k . "<br>"; > } > > I was just wondering in other circumstances, how I can maybe just get > to the value of one of the keys without setting it first to a > variable Sorry, but you can't -- the intermediate variable is the only way (because you can only apply [] to variables!). Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#141978) next »