I am trying to convert the apostrophe in URL string using htmlentities() or htmlspecialchars() .... but it is not working for me...
I have following code:
<?php
$new = htmlspecialchars("<a href='http://abc.test.net/content/22799-mdsap-partners-with-sap’s-‘moving-experience’-initiative-in-the-uae-and-oman'>Test</a>");
echo $new;
?>
but I am getting the output from $new:
<a href='http://abc.test.net/content/22799-mdsap-partners-with-sap’s-‘moving-experience’-initiative-in-the-uae-and-oman'>Test</a>
How to convert the apostrophe and single quotes in url...