deansmar Posted July 27, 2011 Posted July 27, 2011 since my host has gone to PHP 5.3 i am having a couple of problems with a few of my Mods that have been installed. most of the PHP coding i have already changed, because it have found it either hier in the forum or on the contributions page. but there is still a couple of MODs that have not been updated... i am running a v2.2 RC2a shop. i have changed the ereg_replace to preg_replace here is the code and the error that causing me a problem: Deprecated: Function ereg_replace() is deprecated in C:\wamp2\www\shop\Admin\stats_monthly_sales.php on line 248 function mirror_out ($field) { global $csv_accum; echo $field; $field = strip_tags($field); $field = preg_replace (",","",$field); if ($csv_accum=='') $csv_accum=$field; else {if (strrpos($csv_accum,chr(10)) == (strlen($csv_accum)-1)) $csv_accum .= $field; else $csv_accum .= "," . $field; }; return; }; i am obviously missing the so called "//" but were...?? can anyone point me in the right direction. thanks
MrPhil Posted July 28, 2011 Posted July 28, 2011 $field = preg_replace (",","",$field); should be $field = preg_replace ("/,/","",$field); The PREG versions need delimiters around the search pattern, because they can have flags within the same string (e.g., "/[a-z]/i" for case-insensitive).
deansmar Posted July 28, 2011 Author Posted July 28, 2011 thank you very much, i thought they must go there some were :rolleyes:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.