note 60945 deleted from function.number-format by levim

From: Date: Sun, 23 Mar 2014 14:16:01 +0000
Subject: note 60945 deleted from function.number-format by levim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-199027@lists.php.net to get a copy of this message
Note Submitter: ---- A function to return a number with needed zeros at the beginning. Called "zerofill" <?php // $num = 4; $zerofill= 3; returns "004" function zerofill ($num,$zerofill) { while (strlen($num)<$zerofill) { $num = "0".$num; } return $num; } ?>

« previous php.notes (#199027) next »