title: row from odbc array isn't showing index and variable properly, illegal string offset
body: <p>Not sure what I've done here, but I've been trying to run this select, get the row values and use a foreach in order to call a function with those values (coming in as arguments for the function) for an insert down the line.</p>
  
  <p>I was getting illegal string offset errors and undefined variable so I dumped it into the array shown below. </p>
  
  <p>How can I properly alter this to get "PR" = "ABCD" and so on?</p>
  
  <pre><code>public  function ref()
  {
  
      $sql = "select cast(co as DECIMAL) as co, cast(sl as DECIMAL)as sl, cast(pr as character(10)) as pr, cast(qt as decimal) as qt FROM tailbone";
      $results = odbc_exec($this-&gt;DB2Conn, $sql);
  
      $log='';
      if ($results) {
          while($row = odbc_fetch_array($results))
          {
                  var_dump($row);
  
                  $res = $this-&gt;add_quota($results['sl'], $results['pr'], $results['qt'], $results['co']);
  
  
          }
      }
  }
  </code></pre>
  
  <p>array dump:</p>
  
  <pre><code>array(4)
   ["CO"]=&gt;
   string(1) "1"
   ["SL"]=&gt;
   string(1) "1"
   ["PR"]=&gt;
   string(4) "ABCD"
   ["QT"]=&gt;
    NULL
  }
  </code></pre>