title: fetching multiple columns of mysql table and echoing each row
body: <p>I have this php/html code that echos a column from a mysql table called "tickets". 
  These are the 3 columns in the table (member_id, ticket_id, ticket_result). </p>
  
  <p>I want to be able to grab the info from the other columns in a specific row and echo that with the foreach loop. I just don't know how I would be able to do that because you can only have 1 array in a foreach loop so if I was to make add this line to the PHP Code I don't see how I could echo it in the foreach loop.</p>
  
  <pre><code> $me3 = array(); 
  $me2[] = $row-&gt;ticket_result;
  </code></pre>
  
  <p>PHP Code:</p>
  
  <pre><code> public function tickets() { 
      $this-&gt;db_connection = new mysqli('', '', '', ''); 
  
      $sql = "SELECT ticket_result 
              FROM tickets 
              WHERE member_id = '1'"; 
      $query = $this-&gt;db_connection-&gt;query($sql); 
  
      $me2 = array(); 
      while ($row = $query-&gt;fetch_object()) { 
          $me2[] = $row-&gt;ticket_result;     
      } 
      return $me2; 
    } 
  }  
  </code></pre>
  
  <p>HTML Code:</p>
  
  <pre><code>&lt;?php $me2 = $classLogin-&gt;tickets(); ?&gt; 
         &lt;?php foreach($me2 as $value) { ?&gt; 
       &lt;table&gt; 
  &lt;thead&gt; 
  &lt;th&gt;Result&lt;/th&gt; 
  &lt;th&gt;ID&lt;/th&gt;
  &lt;/thead&gt; 
  
  &lt;tr&gt; 
  
  &lt;td&gt;&lt;?php echo $value; ?&gt; &lt;/td&gt; 
  &lt;td&gt;  &lt;/td&gt;
  &lt;?php } ?&gt; 
  &lt;/tr&gt; 
  
  &lt;/table&gt;
  </code></pre>