Jump to content

[SOLVED] Zip Code


karatekid36

Recommended Posts

You're getting that because your column I assume is numeric. Use LPAD() MySQL function to retrieve always 5 digits. Otherwise, change the column to a character type (varchar).

 

http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lpad

 

 

PHP function:

http://us2.php.net/manual/en/function.str-pad.php

Link to comment
https://forums.phpfreaks.com/topic/79927-solved-zip-code/#findComment-404852
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.