- str_repeat: documentation ( source)
- sprintf: documentation ( source)
<?php
foreach(array('Lusitanian', 'cryptic', 'Mike B', 'Jack', 'webarto') as $key => $value)
{
echo sprintf("%s%s[%d]", $value, str_repeat('.', 20 - 1 - strlen($value)), 1), PHP_EOL;
}