Can you provide an example of using strtr() function to replace HTML tags in PHP?

When working with HTML content in PHP, you may need to replace certain HTML tags with different values or remove them altogether. The strtr() function in PHP can be used to replace specified characters or substrings within a string. By using strtr() with an array of HTML tags to be replaced, you can easily manipulate the HTML content as needed.

<?php
$html = "<p>This is <b>bold</b> text.</p>";
$replace_tags = array("<p>" => "<div>", "</p>" => "</div>", "<b>" => "<strong>", "</b>" => "</strong>");
$modified_html = strtr($html, $replace_tags);

echo $modified_html;
?>