[eluser]jeffpeck[/eluser]
OK, I have written a function accomplishes this:
Code:
function encode_for_xmlrpc(&$element) {
if (is_array($element)) {
foreach ($element as $key=>$item)
encode_for_xmlrpc($element[$key]);
$element = array($element, 'struct');
}
else {
if (is_numeric($element)) {
if (intval($element) == $element)
$type = 'int';
elseif (floatval($element) == $element)
$type = 'double';
}
elseif (is_string($element)) {
$type = 'string';
}
$element = array($element, $type);
}
}
encode_for_xmlrpc($result);
Basically, if you have a DB result as an array and you want to send it to an XML-RPC client as an object, it has to have types added to it. This function should do the trick