I have an open source program I am trying to integrate in a website. I would like to update a code in it that is causing problems with my development LAMP setup.
if ($dbselect)
{
if (!eregi('utf',strtolower($script_encoding)) && !defined('IN_LOGINPAGE'))
{
mysql_query("SET NAMES 'utf8'");
}
else if (empty($script_encoding) || eregi('utf',strtolower($script_encoding)))
{
mysql_query("SET NAMES 'utf8'");
}
}
I know that eregi call is deprecated and preg_match is what should be used but it gives me a the following error...
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in
if someone could fix it and explain why I would be greatly appreciated.
TIA (Thanks In Advance)