What is the correct way to assign a value to a textarea in PHP?

When assigning a value to a textarea in PHP, you need to use the `htmlspecialchars()` function to properly escape the value and prevent any potential security vulnerabilities like cross-site scripting (XSS) attacks. This function converts special characters to their HTML entities, ensuring that the content is displayed as-is in the textarea. Here is the correct way to assign a value to a textarea in PHP:

<textarea><?php echo htmlspecialchars($textarea_value); ?></textarea>