could somebody help change this eregi line into preg please?

Hello,

i have been learning php this past week, the main thing is changing eregi to preg as i move a long with a script. However, i am having a few problems getting this line correct. I’m hoping somebody could possible correct it for me.

[php] if (($lang_type == 1 && eregi(’^(’ . $value[0] . ‘)(;q=[0-9]\.[0-9])?$’, $lang_str)) || ($lang_type == 2 && eregi(’((|[|;[[:space:]])(’ . $value[0] . ‘)(;|]|))’, $lang_str))) {
[/php]

Thankyou,

Andy

Sponsor our Newsletter | Privacy Policy | Terms of Service