note 16277 added to function.str-pad
| From: | erdil at mail dot com | Date: | Tue, 23 Oct 2001 15:18:51 +0000 |
| Subject: | note 16277 added to function.str-pad | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-19325@lists.php.net to get a copy of this message | ||
STR_PAD_LEFT does not work, or there is something wrong with this statement:
$paddy = str_pad(number_format($count), 7, " ", STR_PAD_LEFT);
it produces a string of 7 whitespaces. But if you omit STR_PAD_LEFT, then it produces the correct
string, which is padded from right.
--
http://www.php.net/manual/en/function.str-pad.php
http://master.php.net/manage/user-notes.php?action=edit+16277
http://master.php.net/manage/user-notes.php?action=delete+16277
http://master.php.net/manage/user-notes.php?action=reject+16277