- htmlentities: documentation ( source)
- html_entity_decode: documentation ( source)
<?php
$orig = "Congratulations on your employment with &lt;centername&gt; &lt;br/&gt;What: We have a contract
available for your signature! &lt;br/&gt;
Where: Please click the following link to access the Terms2020 Employee
Online system and follow the steps to
sign your contract electronically! &lt;br/&gt; &lt;link&gt; &lt;br/&gt; Support: If you have any questions regarding the contract signing
process, please do not hesitate to contact &lt;name&gt; at &lt;emailaddress&gt;. &lt;br/&gt;
NOTE: Please do not reply to this email as it is generated from an
unattended mailbox. &lt;br/&gt; &lt;empid&gt;";
$a = htmlentities($orig);
$b = html_entity_decode($a);
echo $a; // I'll "walk" the <b>dog</b> now
echo "\n";
echo $b; // I'll "walk" the <b>dog</b> now