I am trying to do a simple convert of single quote ('
) to html entity ('
) but can not figure out why this is not working.
$test = "Bob's House";
echo htmlentities($test,ENT_QUOTES);
echo htmlspecialchars($test,ENT_QUOTES);
Both examples still return: Bob's House
I have tried a combination of flags: ENT_IGNORE, ENT_SUBSTITUTE, etc with no success.
I suspect it has something to do with my charset. If so how do I display my default charset & alter it for this seemingly simple code to work.