title: How can characters " \n \t \r " be replaced with '-'?
body: <p>How can characters " \n \t \r " be replaced  with '-' ?</p>
  
  <pre><code>echo preg_replace('/\s/','-','\n\t\n\r\n');//output '\n\t\n\r\n' instead should be'-----'
  </code></pre>
  
  <p>Edit: I have dynamic content in real app like:</p>
  
  <pre><code> preg_replace('/\s/','-',$_Request['content']);
  </code></pre>
  
  <p>can I fix it by adding "" around variable?</p>
  
  <pre><code>preg_replace('/\s/','-',"$_Request['content']");
  </code></pre>
  
  <p>Edit2:</p>
  
  <p><strong>How can be string converted from format 'str' to format "str"?</strong> </p>
  
  <p>Thanks</p>