replace all spaces and special symbols with dash in url use php language

Posted by khushbu on Stack Overflow See other posts from Stack Overflow or by khushbu
Published on 2010-04-13T06:47:46Z Indexed on 2010/04/13 7:13 UTC
Read the original article Hit count: 195

Filed under:

How to replace space and dash coming together with only dash in php

e.g below is my url [url] => http://kjd.case.150/1 BHK+Balcony- 700+ sqft. spacious apartmetn Bandra West

In this I want to replace all special characters with dash in php.In url there is already 1 dash after balcony.If i m replacing dash with special chars then it becomes two dash bcoz already there is 1 dash in url and i want only 1 dash.

© Stack Overflow or respective owner

Related posts about php