2012-11-28 39 views

回答

3

那麼,number_format不是這樣做的。你可以用多種方法自己做,例如:

echo preg_replace('/^(\d*)(\d{2})(\d{2})$/', '$1/$2/$3', $number); 
2

這樣的事情?

$formatted_number = preg_replace('(\d+?)(\d\d)(\d\d)','$1/$2/$3',$number);