Hi, I'm relatively new to PHP. I'm trying to build a very simple mail tool that will prevent spam and keep the contents of the mail case sensitive - not lowercase. I built the following code but am having trouble inserting str_ireplace into it. Does anybody know what I'm doing wrong?
I keep getting this:
Fatal error: Call to undefined function: str_ireplace() in /home/content/r/o/n/ronohr/html/mail.php on line 28
function clean_input_4email($value, $check_all_patterns = true)
{
$patterns[0] = '/content-type:/';
$patterns[1] = '/to:/';
$patterns[2] = '/cc:/';
$patterns[3] = '/bcc:/';
if ($check_all_patterns)
{
$patterns[4] = '/\r/';
$patterns[5] = '/\n/';
$patterns[6] = '/%0a/';
$patterns[7] = '/%0d/';
}
return str_ireplace($patterns, "", ($value));
}