title: Include same file multiple times in PHP
body: <p>Basically I have a list of particular members that I am calling with their member ID, and displaying the td's afterwards on each one..</p>
  
  <p>So I have the table like this</p>
  
  <pre><code>    &lt;table id="sortable" class="tablesorter" width="100%"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Game Username&lt;/strong&gt;&lt;/th&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Rank&lt;/strong&gt;&lt;/th&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Game Played&lt;/strong&gt;&lt;/th&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Playing On&lt;/strong&gt;&lt;/th&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Age&lt;/strong&gt;&lt;/th&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Time On&lt;/strong&gt;&lt;/th&gt;
        &lt;th class="header"&gt;&lt;strong&gt;Location&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;?php include ("users.php"); ?&gt;
    &lt;/tbody&gt;
  </code></pre>
  
  <p>And the users.php file looks like this, but right now at over 50 lines of the same code as below, with only the $id= number changed..</p>
  
  <pre><code>&lt;tr&gt;&lt;td class="username"&gt;&lt;a href="&lt;?php $id='1'; include ("fields.php"); ?&gt;
  &lt;tr&gt;&lt;td class="username"&gt;&lt;a href="&lt;?php $id='2'; include ("fields.php"); ?&gt;
  &lt;tr&gt;&lt;td class="username"&gt;&lt;a href="&lt;?php $id='3'; include ("fields.php"); ?&gt;
  &lt;tr&gt;&lt;td class="username"&gt;&lt;a href="&lt;?php $id='4'; include ("fields.php"); ?&gt;
  &lt;tr&gt;&lt;td class="username"&gt;&lt;a href="&lt;?php $id='5'; include ("fields.php"); ?&gt;
  </code></pre>
  
  <p>The fields.php file is the remainder of the table rows etc., starting with the below code to close off this td.</p>
  
  <pre><code>&lt;?php echo $domain; $member_id = $id; $user_info = get_userdata($id);echo $user_info-&gt; user_login.""; ?&gt;"&gt;&lt;?php echo xprofile_get_field_data( "$field_gamename" , $member_id); ?&gt;&lt;/a&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>I'm trying to avoid including the fields.php file over 50 times in the users.php file. Anyone got an idea of the most efficient way?</p>
  
  <p>Thanks!</p>