Jump to content

Number display


ecopetition

Recommended Posts

Hello,

 

I'm wondering how I can make the number generated by "rand(0,9999)" always have 4 digits, so if the number 200 is generated, it displays 0200, but if the number 4000 is generated, it remains as 4000.

 

I looked at the manual but didn't manage to find anything on this.

 

Thanks a lot,

Peter

Link to comment
https://forums.phpfreaks.com/topic/140296-number-display/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.