preg_replace is case insensitive, if you set the correct parameters:
PHP Code:
function ($find, $replace, $string)
{
if (is_array($find))
{
$regfind = array();
// sanitize findarray
foreach ($find AS $findstring)
{
$regfind[] = '#' . preg_quote($findstring, '#') . '#i';
}
}
else
{
$regfind = '#' . preg_quote($find, '#') . '#i';
}
return preg_replace($regfind, $replace, $string);
}
(that should work normally, but not tested