note 99008 deleted from function.number-format by danbrown

From: Date: Wed, 21 Jul 2010 21:49:43 +0000
Subject: note 99008 deleted from function.number-format by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-171029@lists.php.net to get a copy of this message
Note Submitter: pike ---- to whomever it may interest .. function is_formatted_number($str,$digits=2,$decpoint=".",$thousep="") { if ($decpoint == ".") $decpoint = "\\."; if ($thousep == ".") $thousep = "\\."; $pattern = "/^\\d{1,3}($thousep\\d{3})*($decpoint\\d{1,$digits})?$/"; return preg_match($pattern,$str); } obviously, thats way too short. but it will probably work in your setup. *-pike

« previous php.notes (#171029) next »