Re: returning arrays
| From: | Alan Knowles | Date: | Thu, 25 Jul 2002 08:46:22 +0000 |
| Subject: | Re: returning arrays | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86178@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);
---- /snip --------- hope someone can tell me whats wrong. marco