How do i enclose the Single quotes in double quotes in javascript
<p>I have a php variable that needs to be interpreted in javascript how do i do this </p>

<pre><code>var cntr = "&lt;?php echo $j;?&gt;";
var opt = "&lt;?php echo $options;?&gt;";
var opt_selected = "&lt;?php echo get_options($val['SOMEVARIABLE'],$opt); ?&gt;";
var reference = "&lt;?php echo $val["RFDREFVAL"];?&gt;";
</code></pre>

<p>How do i correct the above statements iam getting Javascript error "unterminated string contant " .what is the Best to have this php variables interpreted </p>
