title: How to modify output of certain function of File_CSV_DataSource?
body: <p>The following function is from a PEAR script called File_CSV_DataSource, and is a CSV parser.</p>
  
  <p>CSV file is this:<br>
  name,age,skill<br>
  john,13,knows magic<br>
  tanaka,8,makes sushi<br>
  jose,5,dances salsa<br></p>
  
  <p>The current output of this function is like this:</p>
  
  <pre><code>array (0 =&gt; array ('name' =&gt; 'john','age' =&gt; '13','skill' =&gt; 'knows magic',),1 =&gt;array('name' =&gt; 'tanaka','age' =&gt; '8','skill' =&gt; 'makes sushi',),2 =&gt;array ('name' =&gt; 'jose','age' =&gt; '5','skill' =&gt; 'dances salsa',),)
  </code></pre>
  
  <p>what I'm trying to achieve is to make the function to output like this:</p>
  
  <pre><code>array (array ('john','13','knows magic'), array('tanaka','8','makes sushi'), array ( 'jose','5','dances salsa'),)
  </code></pre>
  
  <p>so without the <strong>0 =></strong> and without the <strong>column header =></strong> , only the value of the cells</p>
  
  <p><strong>Is there any way for me to modify the function bellow to make it output as in my example above?</strong></p>
  
  <pre><code>public function connect($columns = array())
  {
      if (!$this-&gt;isSymmetric()) {
          return array();
      }
      if (!is_array($columns)) {
          return array();
      }
      if ($columns === array()) {
          $columns = $this-&gt;headers;
      }
  
      $ret_arr = array();
  
      foreach ($this-&gt;rows as $record) {
          $item_array = array();
          foreach ($record as $column =&gt; $value) {
              $header = $this-&gt;headers[$column];
              if (in_array($header, $columns)) {
                  $item_array[$header] = $value;
              }
          }
  
          // do not append empty results
          if ($item_array !== array()) {
              array_push($ret_arr, $item_array);
          }
      }
  
      return $ret_arr;
  }
  </code></pre>
  
  <p>Thanks in advance</p>