|
Posted by Jacques Lebastard on 01/12/06 23:39
Hi there,
it's my 1st week of PHP so forgive me for such a basic question. I'm
trying to return an array of arrays of strings from a home-made PHP
extension module. My current code looks like :
ZEND_FUNCTION(..)
{
...
array_init(return_value);
add_next_index_long(return_value, nb_of_arrays);
for ( ... ) {
zval *one_array;
array_init(one_array);
add_next_index_long(one_array, nb_of_strings);
for (...) {
add_next_index_string(one_array, string[..],1);
}
add_next_index_zval(return_value, one_array);
}
}
This causes a failure in Apache.
Before debugging my PHP extension tomorrow morning (e.g. to suppress the
useless '# of items' in each array ;-), can anybody tell me whether this
is the proper way to achieve this ?
Thx in advance,
--
Jacques
Navigation:
[Reply to this message]
|