PHP str_pad() Function
The str_pad() PHP function pads a string to a new length.
str_pad(string,length,pad_string,pad_type)
str_pad(string,length,pad_string,pad_type)
Example
$str = "Hello World";
echo str_pad($str,20,"."STR_PAD_LEFT);
Displays:
...................Hello World
$str = "Hello World";
echo str_pad($str,20,"."STR_PAD_LEFT);
Displays:
...................Hello World