David's Blog

Stuff I feel that is interesting

PHP str_pad() Function

Example
$str = "Hello World";
echo str_pad($str,20,"."STR_PAD_LEFT);
Displays:
...................Hello World

Posted: May 25, 2016