[Javascript & PHP] 字串與數字互轉 @ blog :: 隨意窩 Xuite日誌

[Javascript & PHP] 字串與數字互轉 @ blog :: 隨意窩 Xuite日誌

瀏覽:543
日期:2024-07-06
[Javascript] 數字轉字串 str = num.toString() //10 進位num.toString(16) //16 進位, 可轉成2,10,8,16,32進位 字串轉數字 num = parseInt(str)parseInt("FF",16) => 255 [PHP] 數字轉字串 $str = sprintf("%d",$num) 字串轉數字 $num ......看更多