title: Replace all spaces and special symbols with dash in URL using PHP language
body: <p>How to replace spaces and dashes when they appear together with only dash in PHP?</p>
  
  <p>e.g below is my URL</p>
  
  <pre><code>http://kjd.case.150/1 BHK+Balcony- 700+ sqft. spacious apartmetn Bandra Wes
  </code></pre>
  
  <p>In this I want to replace all special characters with dash in PHP. In the URL there is already one dash after "balcony". If I replace the dash with a special character, then it becomes two dashes because there's already one dash in the URL and I want only 1 dash.</p>