Welcome to CGI City - One of the biggest WWW Resources for CGI and Perl materials
Tips and Tutorials
How do I output my numbers in a specific number of digits?

Sometimes you want your numerical out put to look something like "000345" instead of the brief "345". You achieve this by adding the appropriate number of zeroes in front of your number. How?

The following code gives the desired result:

The above code may be modified to suit your own application.


Back to Tips and Tutorials

Search For:
Quick jump to
Home | About Us | Contact Us | Link To Us | Search
Tips & Tutorials | References | Books | Add A Resource
Custom Programming Services | Advertise
Disclaimer | Privacy Policy

Copyright © 1998-2099    CGI City    All Rights Reserved
All original materials contained herein including text, images, and original scripts written by CGI City, are copyrighted by CGI City. All other scripts and materials are copyrighted by their respective authors/owners.