2

I've just upgraded to php 5.4 and I've come across a common error of needing to upgrade my ereg_replace to preg_replace, but I'm a tad confused.

How can I change the following ereg_replace to a preg_replace?

ereg_replace("&page=[0-9]+","",$_SERVER['QUERY_STRING']);
halfer
  • 19,824
  • 17
  • 99
  • 186
dpDesignz
  • 1,909
  • 10
  • 34
  • 70

1 Answers1

3

Try this one:

preg_replace("/&page=[0-9]+/","",$_SERVER['QUERY_STRING']);

Hope this helps :)

Jordan
  • 63
  • 1
  • 5