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:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 2:58 PM
To: [EMAIL PROTECTED]
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



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to