I have the following .htaccess file
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)-pid-(.*)\.html$ product.php?n=$1&pid=$2
and in my php file i have this code:
<?php print $product->name; ?>-pid-<?php print $product[id]; ?>.html
How can I automatically add “-” to the product name so it does not look like this “Apple iPod 32GB 1st generation” but to look like this “Apple-iPod-32GB-1st-generation”
Thanks
It uses + and not -, but a str_replace could change that if you insist.