title: Create a table with multiple arrays PHP
body: <p>I got 2 arrays. The task is to make multiple columns. First a column called "Naam", then "Rugnummers" and then "Goals". These columns need to be filled with the information of these two arrays in it. First the value of Players, then the key of Goals Or Players (both the same) and then the value of Goals. Here are the two arrays.</p>
  
  <pre><code>&lt;?php
  //Opdracht 15
  $goals = [
  3 =&gt; 1,
  5 =&gt; 5,
  6 =&gt; 0,
  7 =&gt; 2,
  9 =&gt; 0,
  12 =&gt; 4,
  14 =&gt; 1,
  17 =&gt; 3,
  18 =&gt; 1,
  19 =&gt; 0,
  21 =&gt; 5,
  22 =&gt; 0,
  23 =&gt; 2,
  24 =&gt; 3,
  28 =&gt; 1,
  30 =&gt; 0
      ];
    $players = [
  3 =&gt; 'Hendrik Leegsta',
  5 =&gt; 'Jan Hilverda',
  6 =&gt; 'Hans Worst',
  7 =&gt; 'Steven Sterk',
  9 =&gt; 'Willy Wortel',
  12 =&gt; 'Flip Flierefluiter',
  14 =&gt; 'Louis Visser',
  17 =&gt; 'Aram Harakisjoen',
  18 =&gt; 'Vladimir de Groot',
  19 =&gt; 'Thomes Thijssen',
  21 =&gt; 'Arie van der Linde',
  22 =&gt; 'Ruben Leegstra',
  23 =&gt; 'Stijn Voorst',
  24 =&gt; 'Louis Finn',
  28 =&gt; 'Jürgen Ultz',
  30 =&gt; 'Giel de Vries'
     ];
  
  ?&gt;
      ?&gt;
  &lt;html&gt;
  
   &lt;style&gt;
   table, th, td{
   border: 1px solid black;
   border-collapse: collapse;
  
   }
   &lt;/style&gt;
   &lt;table&gt;
    &lt;tr&gt;
    &lt;th&gt;Naam&lt;/th&gt;
    &lt;th&gt;Rugnummer&lt;/th&gt;
     &lt;th&gt;Doelpunten&lt;/th&gt;
     &lt;/tr&gt;
  
  
    &lt;?php foreach ($players as $backnumber =&gt; $names) {?&gt;
    &lt;tr&gt;
    &lt;td&gt; &lt;?php echo $names;?&gt; &lt;/td&gt;
    &lt;td&gt;&lt;?php echo $backnumber;?&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;?php  } ?&gt;
    &lt;?php foreach ($goals as $backnumbers =&gt; $scores) { ?&gt;
    &lt;tr&gt;
  
  
      &lt;td&gt;&lt;?php echo $scores;?&gt; &lt;/td&gt;
      &lt;/tr&gt;
  &lt;?php  } ?&gt;
     &lt;/tr&gt;
  
  
  &lt;/table&gt;
    &lt;/html&gt;
  </code></pre>