> -----Original Message----- > From: Charles Kline [mailto:[EMAIL PROTECTED] > Sent: 01 April 2003 21:21 > To: Dan Joseph > Cc: [EMAIL PROTECTED] > 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php