[ PHP ] – 取得數字是幾位數 2015 / 8 / 26 jeff 0 [php] //取得數字長度 $no=1234.5678; echo strlen(floor($no)); //輸出結果 4 [/php] strlen(x) 取得字串長度 floor(x) 取得最接近的整數值