returning arrays

From: Date: Thu, 25 Jul 2002 08:46:53 +0000
Subject: returning arrays
Groups: php.dev 
Request: Send a blank email to php-dev+get-86177@lists.php.net to get a copy of this message
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); } } ---- /snip --------- hope someone can tell me whats wrong. marco

« previous php.dev (#86177) next »