str_pad ... php 填充字符串的右侧,到某新长度 <?php $str = "Hello World"; echo str_pad($str,20,"."); // 填充字符串的右侧,到 20 个字符的新长度 ?> Hello World.........