What is the correct syntax for accessing the length of a string variable in PHP?

To access the length of a string variable in PHP, you can use the built-in function `strlen()`. This function takes a string as an argument and returns the length of the string in terms of the number of characters it contains. By using `strlen()`, you can easily determine the length of any string variable in your PHP code.

$string = "Hello, World!";
$length = strlen($string);
echo "The length of the string is: " . $length;