title: For each php variable in jquery script
body: <p>In my php I have a for each loop that sets the order id. I wish to run a jquery function for each of the orders but I cannot get it to work.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;i id="&lt;?php echo "edit".$row['order_id'] ?&gt;" class="fa fa-pencil-square-o" aria-hidden="true"&gt;&lt;/i&gt;
  </code></pre>
  
  <p>Jquery</p>
  
  <pre><code>$("&lt;?php echo "#edit".$row['order_id'] ?&gt;").click(function(){....}
  </code></pre>
  
  <p>The function runs but only for the second option. The question is how to pass the specific id variable to the script since the $row['order_id'] changes everytime and the script (I assume gets the final value)</p>