What PHP functions can be used to check the length of a string and extract a specific number of characters?
To check the length of a string in PHP, you can use the `strlen()` function. To extract a specific number of characters from a string, you can use the `substr()` function. These functions can be used together to manipulate strings in PHP easily.
$string = "Hello, World!";
$length = strlen($string);
$substring = substr($string, 0, 5); // Extract the first 5 characters
echo "Length of the string: $length" . PHP_EOL;
echo "Substring: $substring";