The str_pad() function used for pad a string to a certain length with another string.
By default pad to the right side of the string.
Syntax
str_pad(string,pad_length,pad_string,pad_type)
pad_type- STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH.
Example
$string = "Hello Dear";
echo str_pad($string,15,".");
Output
Hello Dear......
Copyright ©2022 coderraj.com. All Rights Reserved.