number_format函数不起作用

时间:2013-11-28 16:20:23

标签: add using

我在程序中使用number_format函数但是这个函数不起作用是什么问题?这是我的代码

if($source = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=snbamz&url='.$_GET['url'])){
if($source->SD[1]->COUNTRY['RANK']){
$country    = $source->SD[1]->COUNTRY['RANK'];
$country_name = $source->SD[1]->COUNTRY['NAME'];
}else{
$country='0';
}
if($source->SD[0]->LINKSIN['NUM']){
$back  = $source->SD[0]->LINKSIN['NUM'];
}else{
$back='0';
}
if($source->SD[1]->COUNTRY['CODE']){
$code     = $source->SD[1]->COUNTRY['CODE'];
}else{
$code='';
}
if($source->SD[1]->POPULARITY['TEXT']){
$reach = $source->SD[1]->POPULARITY['TEXT'];
}else{
$reach='0';
}
}else{
$country='0';
$popularity='0';
$reach='0';
}  $reach = number_format($reach);
    $country =  number_format($country);
     $back =  number_format($back); 

0 个答案:

没有答案