X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=format.php;h=1bac60910ffdebe9cd4fa37439365549a9bf6e77;hb=484e7d7390f43456f0dbee648fa9a4e6854401fa;hp=a0e2f85f02d3a8438c5b66eb8d5fa4542454deee;hpb=1f787c4ef79ce26a5385bd325586e7796fadf8b4;p=wfpl.git diff --git a/format.php b/format.php index a0e2f85..1bac609 100644 --- a/format.php +++ b/format.php @@ -26,6 +26,10 @@ function format_int($str) { return ereg_replace('^0*([1-9])', '\1', $str); } +function format_zip($str) { + return ereg_replace('[^0-9]', '', $str); +} + function format_filename($str) { $str = strtolower($str); $str = ereg_replace('[^a-z0-9_.-]', '_', $str);