Resource array of arrays (variable at runTime)

From: Date: Wed, 17 Dec 2003 10:08:50 +0000
Subject: Resource array of arrays (variable at runTime)
Groups: php.internals 
Request: Send a blank email to internals+get-6490@lists.php.net to get a copy of this message
Hello, I try to build an extension for my pleasure. I would like to make a function which return me an array of variable arrays. For example, I would like that the function "myfunction( $line, $col, $DefaultValue)", return me one array of line arrays with col colums. I mean: $array = { [0] => {[0]=>1,[1]=>1,...[col]=>1} [1] => {[0]=>1,[1]=>1,...[col]=>1} ................................................ [line] => {[0]=>1,[1]=>1,...[col]=>1} } Actually, I have this : //********************************************************** zval *childAr , *childAr2 , *childAr3, *childAr4; MAKE_STD_ZVAL(childAr); MAKE_STD_ZVAL(childAr2); MAKE_STD_ZVAL(childAr3); MAKE_STD_ZVAL(childAr4); if (array_init (childA) == FAILURE){ php_error (E_ERROR, "Cannot initialize childAr from return_multi"); RETURN_NULL(); } if (array_init (childAr2) == FAILURE){ php_error (E_ERROR, "Cannot initialize childAr2 from return_multi"); RETURN_NULL(); } if (array_init (childAr3) == FAILURE){ php_error (E_ERROR, "Cannot initialize childAr3 from return_multi"); RETURN_NULL(); } if (array_init (childAr4) == FAILURE){ php_error (E_ERROR, "Cannot initialize childAr4 from return_multi"); RETURN_NULL(); } //********************************************************** So, with this, I can only return an array of four arrays maximum. I mean : $array = { [0] => {[0]=>1,[1]=>1,...[col]=>1} [1] => {[0]=>1,[1]=>1,...[col]=>1} ................................................ [3] => {[0]=>1,[1]=>1,...[col]=>1} } Is is possible to return an array of variable array ? Thank you to help me, Sincerely, Arnaud. --------------------------------- Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Testez le nouveau Yahoo! Mail

« previous php.internals (#6490) next »