title: Undefined offset after returning result to a function, PHP
body: <p>My result from a SQL-query is saved in the variable <code>$res</code>.</p>
  
  <p>A <code>print_r()</code> from <code>$res</code> says this, which is ok (I think):</p>
  
  <pre><code>Array ( [0] =&gt; Array ( [hoejdemeter] =&gt; 1152 [laengde] =&gt; 24120 ) ) 
  </code></pre>
  
  <p>The <code>$res</code> is returned to a function and looped over to get the two variables:</p>
  
  <pre><code>foreach ($Data as  $value) {
      list ($length, $hight) = $Data;
  }
  </code></pre>
  
  <p>Then I get this problem:</p>
  
  <blockquote>
    <p>Notice: Undefined offset: 0 in C:\xampp\htdocs\PhpProject1\BjergCykel1.php on line 95</p>
  </blockquote>
  
  <p>What is wrong?</p>