@NogDogMay 25.2011 — #Simplest solution without the overhead of regexps (and you should be using the preg_*() functions if you do, as the ereg functions are deprecated), would be something like: [code=php] <?php $old = 'products.php?id=1-0'; $new = str_replace('.php?id=', '-', $old) . '.html'; echo $new; [/code]