Why not use the MySql REPLACE() command in your query:
SELECT *, REPLACE(vcity, ' ', '-') AS vcity_replaced FROM table WHERE vcity = '$this->vcity' AND sch_date >= '$this->sch_date' ORDER BY timestmp ASC
It might be possible to do in your htaccess, but that would require a regex that specifically targets each space, am not sure how that could be done, since you don't know how many there are going to be. You could match them, but am not sure how to replace them.
pritaeas
Posting Expert
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
I think this would work for one space:
RewriteRule ^venue-([^/ ]*)( ?)([^/ ]*)\.php$ /venue.php?vcity=$1-$3 [L]
I am not sure yet how to fix it for more.
pritaeas
Posting Expert
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875