Basically, *all* of you guys have a 'long' way of padding text with html tags (which includes ) You dont even have to do a str_replace... try the following code and this will work with ANY html tag there is out there and you don't have to worry about tag character lengths so on and so forth:
<?
$text = "This is pretty interesting!";
$pad_string = " ";
//Pad text on both sides
$text = str_pad($text, strlen($text)+(20*strlen($pad_string)), $pad_string, STR_PAD_BOTH);
print $text." Dont you think?";
?>
Will produce:
This is pretty interesting! Dont you think?
Cheers,
Fahad