Make use of str_pad()'s optional parameters : str_pad « String « PHP
- PHP
- String
- str_pad
Make use of str_pad()'s optional parameters
<?
$header = "Table of Contents";
print str_pad ($header, 5, "=-", STR_PAD_BOTH);
?>
Related examples in the same category