请问哪位大侠知道如何修改下面这句,使用number_format(), 让输出从:  Buy 1000000 for $ 89.00 each 
改为:Buy 1,000,000 for $ 89.00 each echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only'])

解决方案 »

  1.   

    <?php$var=1000000;
    //输出第一种格式
    echo ' Buy 1000000 for $ 89.00 each ';
    //输出第二种格式
    echo " Buy number_format($var) for $ 89.00 each ";?>
      

  2.   

    echo $this->__('Buy %1$s for %2$s each', number_format($_price['price_qty']), $_price['formated_price_incl_weee_only']);
      

  3.   

    谢谢楼上答复,再详细说明一下我的问题:程序原语句:echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) 其中%1$s为变量,赋值来自$_price['price_qty']现输出为:Buy 1000000 for $ 89.00 each
    要改为:Buy 1,000,000 for $ 89.00 each