'ello all.
I am trying to preform a regex to make sure that valid input is entered, but htmlentities and htmlspcialchars don't seem to translate the dollar sign ($) into it's corresponding HTML code (&# 36; ) (spaces added due to board translation of HTML code)
Could someone point me in the right direction?
$_POST['webCurrency'] = "& #36;"; // posted from form with value & # 36; without spaces
$currency = htmlspecialchars(trim($_POST['webCurrency']));
echo 'CURRENCY -> '.$currency; //outputs $
$currency = htmlentities(trim($_POST['webCurrency']));
echo 'CURRENCY -> '.$currency; //outputs $
TIA!