Forum Moderators: coopster
[edited by: dreamcatcher at 6:34 am (utc) on April 19, 2008]
[edit reason] Use example.com, thanks. [/edit]
<?//default string
$url = "http://www.site.com/index.php?showforum=1&s=1856473546375647&topic=84092 ";
echo "\$url before: $url<br>\n";
//what will replace the s=##...
$replace = "";
//using preg_replace to do it
$url = preg_replace("/\&s=[0-9]{1,}/", $replace, $url);
//final string
echo "\$url after: $url<br>\n";
?>