Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Help with a couple of PHP 5.3 Problems


Recommended Posts

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;


{if (strrpos($csv_accum,chr(10)) == (strlen($csv_accum)-1)) $csv_accum .= $field;

else $csv_accum .= "," . $field; };




i am obviously missing the so called "//" but were...??


can anyone point me in the right direction.



Link to comment
Share on other sites

$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).

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...