BOLD vs. BOLD) $clean[$item] = htmlentities($_POST[$item], ENT_QUOTES, 'UTF-8'); } } } //Wash State and Zip Code function washgentle($state, $zip){ //Use the global $clean array global $clean; //Regular expression matching for 5 digits, a possible dash, and possible 4 digits if(preg_match("/^[0-9]{5}[\-]?[0-9]{0,4}$/", $_POST[$zip])){ $clean[$zip] = htmlentities($_POST[$zip], ENT_QUOTES, 'UTF-8'); } //PHP native function for checking for alpha characters only (faster than custom regular expressions) if(ctype_alpha($_POST[$state])){ $clean[$state] = htmlentities($_POST[$state], ENT_QUOTES, 'UTF-8'); } } ?>