---
description: https://stackoverflow.com/questions/14645823/php-display-01-instead-of-1
---

# PHP display 01 instead of 1, number, format, two number (ok)

[https://www.php.net/manual/en/function.sprintf.php](https://www.php.net/manual/en/function.sprintf.php)

```
sprintf("%02d", $number)
// Result 01
```
