title: Tournament Bracket Algorithm
body: <p>i know there's a lot of the same questions out there. This is kind of more specific for this one.</p>
  
  <p>First of all this is all build in PHP. I currently can create the first round but i seem to be having some problems with the ordering and figuring out the algorithm for the placements.</p>
  
  <p>Say if we have 16 players the first round will look like this</p>
  
  <pre><code>1
  16
  
  9
  8
  
  5
  12
  
  13
  4
  
  3
  14
  
  11
  6
  
  7
  10
  
  15
  2
  </code></pre>
  
  <p>I can't seem to figure out the algorithm for this thing. So far i make two arrays 
  1 with the players in ranking order
  1 with the number of players 
  and i'm just taking the first, last from the players match them.
  I need to match this order :/</p>