Reply to php extension: returning array of arrays

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация