What PHP functions can be used to manipulate string length?
To manipulate string length in PHP, you can use various built-in functions such as strlen(), substr(), and str_pad(). Here is an example of how to use these functions to manipulate string length:
// Get the length of a string
$string = "Hello World";
$length = strlen($string);
echo "Length of string: " . $length . "<br>";
// Get a substring of a string
$substring = substr($string, 0, 5);
echo "Substring: " . $substring . "<br>";
// Pad a string to a certain length
$paddedString = str_pad($string, 15, "*");
echo "Padded string: " . $paddedString . "<br>";