title: Creating a table with each row containing a button that relates to the data of that row
body: <p>I was wondering how I would be able to create a button that would be related to the information in that row.</p>
  
  <p>So far I have an array that contains a person's first name, last name, and phone number. I would also like to create a button, so when the user clicks that the information of the person is carried to the next PHP page.</p>
  
  <p>Should I be creating a form each time I create a row in the array?</p>
  
  <p>So far I have:</p>
  
  <pre><code>foreach($array as $row)
          {
                  echo (
                  "&lt;tr&gt;".
                  "&lt;td&gt;".$row['last_name'].       "&lt;/td&gt;".
                  "&lt;td&gt;".$row['first_name'].  "&lt;/td&gt;".
                  "&lt;td&gt;".$row['phone_no'].        "&lt;/td&gt;".
                  "&lt;td&gt;".$row['date_of_birth'].   "&lt;/td&gt;".
                  "&lt;td&gt;".$row['membership'].  "&lt;/td&gt;".
                  "&lt;td&gt;&lt;Button&gt;Reserve&lt;/Button&gt;&lt;/td&gt;".
                  "&lt;/tr&gt;&lt;/table&gt;");
          }
  </code></pre>
  
  <p>The reason it is being echoed is because I am using it in an ajax function and wish to output the result that way.</p>
  
  <p>Any suggestions? </p>