News:

SMF - Just Installed!

Main Menu

Pad to the right side of the string

Started by KingSparta, Dec 16, 2023, 02:27 PM

Previous topic - Next topic

KingSparta

Pad to the right side of the string, to a new length of 20 characters:

<?php
$str = "Hello World";
echo str_pad($str,20,".");
?>