Re: Restore Leading Zeros in Zip Codes
| From: | Micah Gersten | Date: | Fri, 22 Aug 2008 02:54:22 +0000 |
| Subject: | Re: Restore Leading Zeros in Zip Codes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278493@lists.php.net to get a copy of this message | ||
if (strlen($zip) == 4 || strlen($zip) == 9)
$zip = "0$zip";
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Keith Spiller wrote:
> Hi,
>
> RE: Restore Leading Zeros in Zip Codes
>
> Does anyone happen to have a script that will restore the leading zeros in a mixed data set of
> 5 digit zip codes and 10 digit zip+4 codes? Any suggestions?
>
> Thanks,
>
>
> Keith
>