---
# System prepended metadata

title: php 取小數點
tags: [php]

---

---
tags: php,
---
# php 取小數點
用除法取小數點位數，
```
$var = rand(0,100)/10;  // 數值0-10 取小數點一位
```

