Donato Molino wrote: > Hello, > > I would like to set in a xmlrpc client an instructions as follow: > > $M=count($array); > > foreach ($elements as $key => $val) { > for ($d = 0; $d < $M; $d++) { > $VET[$key][$d] = new xmlrpcval($_POST[$key][$d], 'string'); > } > } > You are missing an encoding level here: $VET is an array-of-arrays, ans as such cannot be simply encoded later on
$VET = array(); foreach ($elements as $key => $val) { $arr = array(); for ($d = 0; $d < $M; $d++) { $arr[$d] = new xmlrpcval($_POST[$key][$d], 'string'); } $VET[$key] = new xmlrpcval($arr, 'array'); } You could also try out the easier way to encode: php_xmlrpc_encode() ... Ciao Gaetano > and then: > > $ve=new xmlrpcval( array ( > "user" => new xmlrpcval($userid, 'int'), > "VET" => new xmlrpcval($VET, 'struct'), > ), 'struct' ); > > But it fails. > > The server method signature is: > > $DoInsert_sig=array(array($xmlrpcStruct, $xmlrpcStruct)); > > Any help would be greatly appreciated. > > Donato > _______________________________________________ > phpxmlrpc mailing list > phpxmlrpc@lists.usefulinc.com > http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc > > _______________________________________________ phpxmlrpc mailing list phpxmlrpc@lists.usefulinc.com http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc