Re: getting values from objects

From: Date: Tue, 01 Apr 2003 20:20:56 +0000
Subject: Re: getting values from objects
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141868@lists.php.net to get a copy of this message
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 (which is the only way I know how to now). Thanks, Charles On Tuesday, April 1, 2003, at 03:18 PM, Dan Joseph wrote:
Have you tried: extract ($myvar = $res_pform->getSubmitValue("investigator5")); -Dan Joseph -----Original Message----- From: Charles Kline [mailto:ckline@rightcode.net] Sent: Tuesday, April 01, 2003 2:58 PM To: php-general@lists.php.net Subject: [PHP] getting values from objects hi there, if this: $res_pform->getSubmitValue("investigator5"); returns an array, how do I get to the individual values in that array without first setting it to a variable like: $myvar = $res_pform->getSubmitValue("investigator5"); echo $myvar['field']; thanks charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#141868) next »