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.
HTML
<i id="<?php echo "edit".$row['order_id'] ?>" class="fa fa-pencil-square-o" aria-hidden="true"></i>
Jquery
$("<?php echo "#edit".$row['order_id'] ?>").click(function(){....}
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)
.phpscript?