XML-RPC is clever enough to automatically detect the data type of the parameters passed to it in the xmlrpc_encode_request function.
Example code:
<?php $intvar = "77"; settype($intvar, "integer"); $req = xmlrpc_encode_request("NameOfRemoteCall', $intvar); echo $req; ?>
Output:
<?xml version="1.0" encoding="iso-8859-1"?> <methodCall> <methodName>NameOfRemoteCall</methodName> <params> <param> <value><int>77</int></value> </param> </params> </methodCall>
Tags: data types, rpc, variables, xml