title: Delete button for each row in a table PHP
body: <pre><code>&lt;td style="text-align: left;"&gt;
      &lt;?php
            echo '&lt;button type="button" class="btn btn-danger delete delete-account"&gt;&lt;i class="fa fa-trash-o fa-lg"&gt;&lt;/i&gt; Delete&lt;/a&gt;&lt;/button&gt; 
                  &lt;input type="hidden" value="'. $r['user_id'] .'" name="delete[]"&gt;';
      ?&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>I have this piece of code with this javascript:</p>
  
  <pre><code>$('button.delete-account').click(function(e) {
      swal({
          title: "Are you sure?",
          text: " &lt;?php echo $r['user_id'] ?&gt; You will not be able to undo this acction !",
          type: "warning",
          showCancelButton: true,
          confirmButtonColor: "#DD6B55",
          confirmButtonText: "Yes, delete it!",
          closeOnConfirm: false,
          html: false
      }, function() {
          swal("Deleted!", "Your imaginary file has been deleted.", "success");
      });
  });
  </code></pre>
  
  <p>$r['user_id']---> this basically a function that helps me pull all the user from my database, for this example, it will pull all the user_id. </p>
  
  <p>Problem is I have got different users in each row, and when I click on the delete button I am getting the same user_id not individual id's. </p>
  
  <p>How would I be able to call each user individually???</p>
  
  <p>Thanks guys :) </p>