[ZEND-PHP-DEV] Some technical help
| From: | Sylvain B | Date: | Mon, 11 Nov 2002 20:55:43 +0000 |
| Subject: | [ZEND-PHP-DEV] Some technical help | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-90806@lists.php.net to get a copy of this message | ||
Hello,
I'am trying to develop a php-module. I have found a lot of help in the php
manual and in code source of php,
but i have still some problems to use array by parameter.
I'd like to make a "test" function to take an array by parmeter, to re
create it, and to return it
but it's failed :
ZEND_FUNCTION( sylvain_array_cpy ) {
zval * arr;
Bucket * ptr;
HashTable * target_hash;
if( zend_parse_parameters( ZEND_NUMS_ARGS() TSRMLS_CC, "a", &arr ==
FAILURE ) { return;}
target_hash = HASH_OF(arr);
ptr = target_hash -> pListHead;
array_init( return_value );
while( ptr != NULL ){
add_next_index_double( return_value, *((double*)(ptr->pData) );
ptr=ptr->pNext;
}
}
In fact, i probably do not use the rigth methode : i just want to access to
the element of my array (it a array : { 0=>0.11111, 1=>12.2, .......}
(array of double)
thx for you help
Sylvain