<html lang="en">
<head>
<meta charset="utf-8">
<title>Pad the Left End of a String in PHP</title>
</head>
<body>
// Sample string
$str = "Hello World";
// Padding the left end of string
echo str_pad($str, 16, "*", STR_PAD_LEFT);
</body>
</html>