title: Add double back slash to single in php
body: <p>I have searched a lot and tried javascript replace() function and str_replace,addslashes , strip slashes  as well but i am not getting the right output.</p>
  
  <p>This is what im doing:</p>
  
  <pre><code>str_replace("\\","\\\\", "C:wamp\www\desi\uploads\artist\bg\9.jpg";
  </code></pre>
  
  <p>THe output i am getting is:</p>
  
  <pre><code>C:wampwwwÞsiuploads\A rtist\B g .jpg
  </code></pre>
  
  <p>Then another way i  tried:</p>
  
  <pre><code>var clean=  "&lt;?php echo str_replace("\\","@",LINKCONSTANT); ?&gt;".replace("@","\\");
  </code></pre>
  
  <p>Still not working any idea ?</p>