Re: [PHP-DEV] Returning multi-dimensional array From: Andrei Zmievski (andrei <email protected>)
Date: 05/15/00

On Mon, 15 May 2000, adam <email protected> wrote:
> Hi,
>
> looking at the ZEND API it's not obvious to me how I return a multi-
> dimensional array (from C). If anybody could provide information and/or
> sample code that would be great.

You do array_init(return_value) first. Then for each inner array you
allocate a zval*, initialize it, add data to it, and add it to the
return value.

-Andrei

"I think it would be a good idea." -- Mahatma Gandhi,
when asked what he thought of Western civilization...

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>