note 61291 added to function.number-format
| From: | adnan | Date: | Mon, 30 Jan 2006 15:43:45 +0000 |
| Subject: | note 61291 added to function.number-format | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102730@lists.php.net to get a copy of this message | ||
Just a note to the author of the "zerofill" function, you may find it easier using the
str_pad function
<?php
$num = 4;
$zerofill = 3;
echo str_pad($num, $zerofill, "0", STR_PAD_LEFT);
/* Returns the same wanted result of '004' */
?>
----
Server IP: 85.116.0.130
Probable Submitter: 81.79.84.235
----
Manual Page -- http://www.php.net/manual/en/function.number-format.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61291
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61291&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61291&report=yes
Search -- http://master.php.net/manage/user-notes.php