There is an optional third parameter to str_pad( ) that lets you set the padding character to use
<? $string = "Goodbye, Perl!"; $newstring = str_pad($string, 10, 'a'); ?>