Jump to content

Change ereg_replace to preg_replace syntax


halosinfire

Recommended Posts

I've never quite understood the syntax of preg_replace and now I need to convert the following line of code from ereg_replace to preg_replace because ereg_replace is deprecated.  Can anyone help?

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

Any help would be greatly appreciated. 

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.