What is the purpose of the html_entity_decode function in PHP?

The html_entity_decode function in PHP is used to convert HTML entities back to their corresponding characters. This is useful when you have HTML-encoded text that you want to display as plain text in your application.

// Example usage of html_entity_decode function
$html_encoded_text = "<p>This is some <b>bold</b> text</p>";
$decoded_text = html_entity_decode($html_encoded_text);
echo $decoded_text;