Re: help request: php array

From: Date: Tue, 07 Oct 2003 12:46:24 +0000
Subject: Re: help request: php array
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4722@lists.php.net to get a copy of this message
Try something like this: if (rep_CONSP(in)) { array_init(return_value); /* sets it up as an array */ for (i = in; i != Qnil; i = rep_CDR(i)) { zval *tmp; MAKE_STD_ZVAL(tmp); rep_data_converter(rep_CAR(i), tmp); add_next_index_zval(return_value, tmp); /* equivalent to $ret[] = $tmp */ } } > if(rep_CONSP(in)) { > zval php_array; > //zend_hash_init(&php_array,100, > repv i,t; > for(i=in;i!=Qnil;i=rep_CDR(i)) { > printf("REP FWD to next element\n"); > rep_data_converter(rep_CAR(i),&t); > /* ??? add t to array php_array */ > } > }

« previous php.internals (#4722) next »