printf: Left-pad the string %s, %-6s
<?php printf ("Left-pad the string %s with dashes: %'-6s\n", 'foo', 'foo'); ?>