title: Get PHP array values and print it on different columns
body: <p>Here I have a loop containing 5 names in a <code>&lt;table&gt;</code> row. This <code>table</code> should be a ranking where the first column will display a row of the participant names and the other 10 columns should display the scores.</p>
  
  <p>For the empty columns where I want to add the score numbers, I'd like to create an <code>array</code> for each participant and make it loop through the <code>&lt;td&gt;</code>. Into the <code>array</code> there are 10 numbers where each number should display on each empty <code>&lt;td&gt;</code> left.</p>
  
  <pre><code>//Names
  $names = array("Mike", "Kyle", "Johnny", "Will", "Vasques");
  
  //scores values for each name
  $scores = array(
      "Mike"    =&gt; array(04, 03, 00, 07, 04, 07, 00, 01, 00, 07, 04),
      "Kyle"    =&gt; array(07, 01, 00, 03, 04, 01, 00, 07, 03, 04, 04),
      "Johnny"  =&gt; array(07, 07, 00, 03, 00, 04, 00, 01, 01, 04, 03),
      "Will"    =&gt; array(03, 04, 00, 03, 04, 07, 00, 01, 00, 07, 04),
      "Vasques" =&gt; array(03, 01, 00, 03, 04, 07, 00, 01, 00, 07, 07)
  );
  
  //start loop for rows
  for($x=0; $x&lt;count($names); $x++) {
    echo "&lt;tr&gt;";
    //column for the names
    echo "&lt;td&gt;$names[$x]&lt;/td&gt;";
    //loop for columns where the score should be displayed
    for($td=2; $td&lt;=10; $td++) {
      echo "&lt;td&gt;&lt;/td&gt;";
    }
    echo "&lt;/tr&gt;";
  }
  </code></pre>
  
  <p>It should display something like this:</p>
  
  <pre><code>Mike   04  03  00  07  04  07  00  01  00  07  04
  Kyle   07  01  00  03  04  01  00  07  03  04  04
  Johnny 03  01  00  03  04  07  00  01  00  07  07
  </code></pre>
  
  <p>and so on...</p>