Return array in parameter from extension
| From: | Ole Stakemann | Date: | Tue, 24 Sep 2002 16:21:01 +0000 |
| Subject: | Return array in parameter from extension | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-88563@lists.php.net to get a copy of this message | ||
Hi
This is probably a stupid question, but I can't figure it out. I've been trying to search the PHP site for an answer without luck.
I want to return results in an array from an extension. The array may or may not be defined. The array may or may not contain values. The PHP function could be something like
function modarray(&$inoutarray)
{
if (!isset($inoutarray))
{
$inoutarray = array();
}
$inoutarray[] = newval1;
$inoutarray[] = newval2;
}
How do I do that in an extension? I want to adhere to the recommendation that allow_call_time_pass_reference should be off.
-Ole
--
______________________________________
Konsulentfirmaet Ole Stakemann ApS
Fortunvej 55
DK-2920 Charlottenlund
Denmark
e-mail: ole@stakemann.dk
Phone: +45 39 64 10 68
Fax: +45 39 64 10 67