diff --git a/reference/strings/functions/str-pad.xml b/reference/strings/functions/str-pad.xml index b42216ad06..8d237f66b7 100644 --- a/reference/strings/functions/str-pad.xml +++ b/reference/strings/functions/str-pad.xml @@ -44,7 +44,7 @@ If the value of pad_length is negative, less than, or equal to the length of the input string, no padding - takes place. + takes place, and input will be returned. @@ -96,7 +96,8 @@ $input = "Alien"; echo str_pad($input, 10); // produces "Alien " echo str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien" echo str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___" -echo str_pad($input, 6 , "___"); // produces "Alien_" +echo str_pad($input, 6, "___"); // produces "Alien_" +echo str_pad($input, 3, "*"); // produces "Alien" ?> ]]>