-1
我嘗試這樣做:PHP number_format FUNC改變11223344556677到1122334455/66/77
$number = 11223344556677;
echo number_format($number,2,'/',2,'/','');
,但沒有得到結果。請幫忙。
我嘗試這樣做:PHP number_format FUNC改變11223344556677到1122334455/66/77
$number = 11223344556677;
echo number_format($number,2,'/',2,'/','');
,但沒有得到結果。請幫忙。
那麼,number_format
不是這樣做的。你可以用多種方法自己做,例如:
echo preg_replace('/^(\d*)(\d{2})(\d{2})$/', '$1/$2/$3', $number);
這樣的事情?
$formatted_number = preg_replace('(\d+?)(\d\d)(\d\d)','$1/$2/$3',$number);