When I moved to a new server, eregi function generates too many errors. I like to use preg_replace instead of eregi function.
Here is my block of code:
if($rstate && !$rcity && !eregi("outside",$rstate)){
$h1title=str_replace('DDD',$tsstate,str_replace('XXX',$tsstate,$pagetitlet));
echo str_replace('DDD',$tsstate,str_replace('XXX',$tsstate,$pagetitlet));
I changed it to:
if($rstate && !$rcity && !preg_replace("outside",$rstate)){
$h1title=str_replace('DDD',$tsstate,str_replace('XXX',$tsstate,$pagetitlet));
echo str_replace('DDD',$tsstate,str_replace('XXX',$tsstate,$pagetitlet));
But it is looking for another value. How do I add the third parameter for preg_replace to get it worked?
Thanks.