I am facing a problem . In front page of my website i got following warning: Deprecated: Function ereg() is deprecated. Yesterday it was working right. I have searched in google and got that we have to substitue with "preg_match". I did it but problem is same.
Here is the code:
<?php
/*CSS fixed for some browser*/
$browser=$_SERVER['HTTP_USER_AGENT'];
if(ereg('MSIE 6', $browser)) {
// hack IE here
?>
<link href="<?php echo JURI::base();?>/templates/crnatoday/templates/template_ie6.css" rel="stylesheet" type="text/css" />
<?
} else if(ereg('MSIE 7', $browser)) {
// hack IE here
?>
<link href="<?php echo JURI::base();?>/templates/crnatoday/templates/template_ie7.css" rel="stylesheet" type="text/css" />
<?
} else if(ereg('Safari/([0-9].[0-9]{1,2})', $browser)){
// hack safari here
?>
<link href="<?php echo JURI::base();?>/templates/crnatoday/templates/safari.css" rel="stylesheet" type="text/css" />
<?
} else if(ereg('Firefox/2', $browser) && ereg('Windows', $browser)) {
// hack firefox2
?>
<link href="<?php echo JURI::base();?>/templates/crnatoday/templates/firefox2_win.css" rel="stylesheet" type="text/css" />
<?php
} else if(ereg('Firefox', $browser) && ereg('Mac', $browser)) {
// hack firefox2
?>
<link href="<?php echo JURI::base();?>/templates/crnatoday/templates/firefox_mac.css" rel="stylesheet" type="text/css" />
<?php
} else if(ereg('Mozilla/([0-9].[0-9]{1,2})', $browser)) {
// hack mozilla here
} else {
// hack other here
}
?>
Please help to sought it out.