title: Sanitizing urls using php for seo friendly
body: <p>I am in the process of turning my urls seo friendly.</p>
  
  <p>My urls for my blog currently look like:</p>
  
  <pre><code>http://domain.com/news/view-article.php?id=23+category=qrops+title=moving-your-pension-abroad---what-are-the-benefits?
  </code></pre>
  
  <p>How can I ensure characters like @ ? >&lt; don't appear in my url?</p>
  
  <p>How can I avoid duplicate --- ?</p>
  
  <p>Code to generate the url is as follows:</p>
  
  <pre><code>&lt;a class="small magenta awesome" title="View full article" href="view-article.php?id='.$row['id'].'+category='.strtolower($row['category']).'+title='.strtolower(str_replace(" ","-",$row['title'])).'"&gt;View full article &amp;raquo;&lt;/a&gt;
  </code></pre>
  
  <p>Pretty sure I am doing something wrong but I'm trying...</p>
  
  <p>Help appreciated..</p>
  
  <p>I will move on to using the mod_rewrite in apache afterwards</p>