Table of contents Home page
echo '*', str_pad('Hello', 10), "*\n"; // Pad the string with spaces on the right side to a length of 10 characters
echo str_pad('Hello', 10, '01'), "\n"; // Pad the string with zeros and ones on the right side to a length of 10 characters
echo '*', str_pad('Hello', 10, ' ', STR_PAD_BOTH), "*\n"; // Pad the string with spaces on both sides to a length of 10 characters