diff --git a/reference/strings/functions/str-pad.xml b/reference/strings/functions/str-pad.xml index 4acd1776b8..093c7b2ea4 100644 --- a/reference/strings/functions/str-pad.xml +++ b/reference/strings/functions/str-pad.xml @@ -1,5 +1,5 @@ - + @@ -46,6 +46,7 @@ $input = "Alien"; print str_pad($input, 10); // produces "Alien " print str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien" print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___" +print str_pad($input, 6 , "___"); // produces "Alien_" ?> ]]> @@ -54,8 +55,8 @@ print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___" The pad_string may be truncated if the - required number of padding characters can't be evenly diveded by - the padding strings length. + required number of padding characters can't be evenly divided by + the pad_string's length.