Display the drop-down list

str_pad()

« str_ireplace | str_repeat »
<?php
$string 
str_pad (
    
// string $input
    
// int $pad_length
    
// [string $pad_string = " "]
    
?  // [int $pad_type = STR_PAD_RIGHT]
);
?>
Result
$string = '__Alien___'
Examples
#1 str_pad  ("Alien",
 
10)
#2 str_pad  ("Alien",
 
10,
 
"-=",
 
STR_PAD_LEFT)
#3 str_pad  ("Alien",
 
10,
 
"_",
 
STR_PAD_BOTH)
#4 str_pad  ("Alien",
 
6,
 
"___")