I have a php variable that needs to be interpreted in javascript how do i do this
var cntr = "<?php echo $j;?>";
var opt = "<?php echo $options;?>";
var opt_selected = "<?php echo get_options($val['SOMEVARIABLE'],$opt); ?>";
var reference = "<?php echo $val["RFDREFVAL"];?>";
How do i correct the above statements iam getting Javascript error "unterminated string contant " .what is the Best to have this php variables interpreted