Yes, Check out zend_hash_update() and zend_hash_index_update() to add elements to your array. For multidimensional arrays, each element (that is an array) mould be a *zval that was previously array_init()'d and filled with zvals pointers.
Not sure but I think the PECL list might be a better place for the question. -Justin Hannus "VIVI arno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I try to build an extension for my pleasure. > I would like to make a function which return me an array of variable arrays. For example, I would like that the function "myfunction( $line, $col, $DefaultValue)", return me one array of line arrays with col colums. > I mean: > $array = { [0] => {[0]=>1,[1]=>1,...[col]=>1} > [1] => {[0]=>1,[1]=>1,...[col]=>1} > ................................................ > [line] => {[0]=>1,[1]=>1,...[col]=>1} > } > > Actually, I have this : > > //********************************************************** > zval *childAr , *childAr2 , *childAr3, *childAr4; > MAKE_STD_ZVAL(childAr); > MAKE_STD_ZVAL(childAr2); > MAKE_STD_ZVAL(childAr3); > MAKE_STD_ZVAL(childAr4); > > if (array_init (childA) == FAILURE){ > php_error (E_ERROR, "Cannot initialize childAr from return_multi"); > RETURN_NULL(); > } > if (array_init (childAr2) == FAILURE){ > php_error (E_ERROR, "Cannot initialize childAr2 from return_multi"); > RETURN_NULL(); > } > if (array_init (childAr3) == FAILURE){ > php_error (E_ERROR, "Cannot initialize childAr3 from return_multi"); > RETURN_NULL(); > } > if (array_init (childAr4) == FAILURE){ > php_error (E_ERROR, "Cannot initialize childAr4 from return_multi"); > RETURN_NULL(); > } > //********************************************************** > > So, with this, I can only return an array of four arrays maximum. > I mean : > $array = { [0] => {[0]=>1,[1]=>1,...[col]=>1} > [1] => {[0]=>1,[1]=>1,...[col]=>1} > ................................................ > [3] => {[0]=>1,[1]=>1,...[col]=>1} > } > > > > Is is possible to return an array of variable array ? > > Thank you to help me, > Sincerely, > Arnaud. > > > > > > > --------------------------------- > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! > Testez le nouveau Yahoo! Mail -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php