Comma separator while retrieving cpanel account data with api

falkor

Registered
Aug 12, 2006
1
0
151
I am using the code below to retreive cpanel account data:

include("cpanel.php");

$ip="127.0.0.1";
$port=2083;

$account='some-account';
$passwd='some-password';

$xmlapi=new xmlapi($ip);
$xmlapi->password_auth($account,$passwd);
$xmlapi->set_port($port);

$call=array('display' => 'diskusage|bandwidthusage');
$result=$xmlapi->api2_query($account,'StatsBar','stat',$call);

$diskusage=$result->data[0]->count;
$bandwidthusage=$result->data[1]->count;

echo $diskusage; // and I get: 25,274,9
echo $bandwidthusage; // and I get: 10,477,08

The problem is I am getting comma as thousands separator
and also comma as decimal point.