-1
    function removeColorCode($text) {
      return preg_replace('/\\^([0-9])/ie', '', $text);
    }

The above code gives a deprecation warning on Echelon B3 i think after upgrading to PHP 5.5.29 by our host provider


How can I replace the code properly with preg_replace_callback()?

Rodlake
  • 9
  • 4
  • @Toto I have seen that post but i didn't know how to correct my code if you know please share it.............. thankyou – Rodlake Jan 30 '16 at 10:19

1 Answers1

0

In this specific case, just remove the /e it does nothing here.
You can also remove the /i So your code becomes:

function removeColorCode($text) {
  return preg_replace('/\^[0-9]/', '', $text);
}
Toto
  • 89,455
  • 62
  • 89
  • 125