note 94789 deleted from function.sprintf by felipe

From: Date: Sun, 29 Nov 2009 18:52:45 +0000
Subject: note 94789 deleted from function.sprintf by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163383@lists.php.net to get a copy of this message
Note Submitter: Paval Reason: 1 ---- $_prod_id = 'mt0001'; $_id = ceil(preg_replace("/[a-z]|-|_/", "", $_prod_id)/100); $_prod = preg_replace("/[0-9]/", "", $_prod_id); echo $_prod.sprintf("%04d",$_id).'-'.sprintf("%04d",$_id+99); Output: mt0001-0100

« previous php.notes (#163383) next »