How to escape all special characters in a string (along with single and double quotes)?
<p>E.g:</p>
<pre><code>$myVar=&quot;this#@#!~`%^&amp;*()[]}{;'&quot;.,&lt;&gt;?/\&quot;;
</code></pre>
<p>I am not able to export this variable and use it as it is in my program.</p>