title: How to use a php variable id in a jquery function?
body: <p>Below code works for value(<code>B</code>) in <code>select#B</code> but NOT for a variable(<code>$index</code>) in <code>select#index</code>.
  Actually I need <code>id</code> to be a variable and want a jQuery function to operate on that variable.</p>
  
  <h2>jquery function:</h2>
  
  <pre><code>$(function(){
  
      $('select#B').change(function(){
  
          var this_value = $(this).val();
  
              $('input#seleted_value').val(this_value);
  
      });
  
  });
  </code></pre>