How to get variable ID from php to jquery
<p>This is me first question ever. I looking solution one week, and although I tried many ways, still doesn't work.</p>

<p>I don't know how from php get variable ID to jquery; below me short code: </p>

<pre><code>    $(document).ready(function(){

    var ID = $(this).attr('id');   //here I would like to get &lt;?php echo $id; ?&gt;

        $('#itemCode_'+ ID ).autocomplete({
            source: 'data/item-data.php',
            minLength: 1,
            select: function(event, ui) {

var ID = $(this).attr('id');

    $(this).closest('tr').find('#itemCode_' + ID).val(ui.item.itemCode);    
    $(this).closest('tr').find('#itemDut').val(ui.item.itemDut);
    $(this).closest('tr').find('#itemDesc').val(ui.item.itemDesc);

       $('#itemQty').focus();

      return false;   } 
</code></pre>

<p>Below is my php which is multiplicate by loom while($row=mysql_fetch_array($sql))</p>

<pre><code>&lt;tr class="item-row"&gt;
&lt;td&gt;&lt;input id="itemCode_&lt;?php echo $id; ?&gt;" name="itemCode[]" class="itemCode" value="&lt;?php echo $part_nr;?&gt;"  &gt;&lt;/td&gt;
&lt;td&gt;&lt;input name="itemDut[]" value="&lt;?php  echo $itemDut;?&gt;"  &gt;&lt;/td&gt;
&lt;td&gt;&lt;input name="itemDesc[]" value="&lt;?php  echo $forecast;?&gt;"  &gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Please help me find solution, but really I'm stuck. I'd like to add that I also try use . class.</p>
