Javascript variable value in page source for seo from Drupal.settings Declared a variable in settings.php

$conf['my-variable'] ="my-variable-value";


Added inline javascript 

drupal_add_js("array('my-variable'=&gt;variable_get('my-variable'))");


Need to print variable values from Drupal.setttings in inline js 

drupal_add_js("jQuery(document).ready(function(){
  window.my-val = Drupal.settings.my-variable;

})",'inline');


So the output on page is comming up like

&lt;script type="text/javascript"&gt;
window.my-val =Drupal.settings.my-variable; 
&lt;/script&gt;


But I need it should be like below for seo requirement

&lt;script type="text/javascript"&gt;
window.my-val = "my-variable-value";
&lt;/script&gt;
I think you're over-estimating the potential SEO value of making such a change, but if you don't want to use Drupal settings you can just interpolate the value into a static string and use that:

$var = variable_get('my-variable');
$js = &lt;&lt;&lt;EOF
function() { 
  window['my-val'] = '{$var}';
}
EOF;
drupal_add_js($js, 'inline');


I'll leave data-sanitising up to you, how far you need to go will depend on the source of the variable.