note 115021 added to function.str-pad
| From: | nehuensd at gmail dot com | Date: | Tue, 13 May 2014 17:29:41 +0000 |
| Subject: | note 115021 added to function.str-pad | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199530@lists.php.net to get a copy of this message | ||
if the length of the pad is less than or equal to the string, the original string will be returned
<?php
echo(str_pad("abcd", 2, "-", STR_PAD_LEFT)."<br>");
echo(str_pad("abcd", 4, "-", STR_PAD_LEFT)."<br>");
echo(str_pad("abcd", 6, "-", STR_PAD_LEFT)."<br>");
Output:
abcd
abcd
--abcd
----
Server IP: 72.52.91.14
Probable Submitter: 190.7.251.125
----
Manual Page -- http://php.net/manual/en/function.str-pad.php
Edit -- https://master.php.net/note/edit/115021
Del: integrated -- https://master.php.net/note/delete/115021/integrated
Del: useless -- https://master.php.net/note/delete/115021/useless
Del: bad code -- https://master.php.net/note/delete/115021/bad+code
Del: spam -- https://master.php.net/note/delete/115021/spam
Del: non-english -- https://master.php.net/note/delete/115021/non-english
Del: in docs -- https://master.php.net/note/delete/115021/in+docs
Del: other reasons-- https://master.php.net/note/delete/115021
Reject -- https://master.php.net/note/reject/115021
Search -- https://master.php.net/manage/user-notes.php