AW: [PHP-DEV] returning arrays

From: Date: Thu, 25 Jul 2002 08:52:23 +0000
Subject: AW: [PHP-DEV] returning arrays
Groups: php.dev 
Request: Send a blank email to php-dev+get-86179@lists.php.net to get a copy of this message
> Marco Glatz wrote: > > >hi there, > > > >i have an extension with a funtion that should return an > array, but my array > >is empty ?. > > > > > >------ snip ------ > > > >ZEND_FUNCTION(foo) > >{ > > zval *tmp_array; > > > > MAKE_STD_ZVAL(tmp_array); > > > > array_init(tmp_array); > > array_init(return_value); > > > > > > // a loop to fill the array with some data > > for(i=0; i < 10; i++) { > > add_index_string(tmp_array, i, some_data, 1); > > } > >} > > > > is it missing some code - or did you mean to do > > add_index_string(return_value, i, some_data, 1); whoops ... anyway, thanx :o) marco

« previous php.dev (#86179) next »