PHP Classes

This is a good and useful class ! lol

Recommend this page to a friend!

      CSV_Parser  >  All threads  >  This is a good and useful class ! lol  >  (Un) Subscribe thread alerts  
Subject:This is a good and useful class ! lol
Summary:Package rating comment
Messages:2
Author:Josť Filipe Lopes Santos
Date:2010-12-14 12:24:19
Update:2010-12-14 21:04:43
 

 

Josť Filipe Lopes Santos rated this package as follows:

Utility: Good
Consistency: Good
Examples: Good

  1. This is a good and useful class ! lol   Reply   Report abuse  
Picture of Josť Filipe Lopes Santos Josť Filipe Lopes Santos - 2010-12-14 12:24:19
This is a good and useful class ! lol

  2. Re: This is a good and useful class ! lol   Reply   Report abuse  
Picture of Ole Kristian Ek Hornnes Ole Kristian Ek Hornnes - 2010-12-14 21:04:43 - In reply to message 1 from Josť Filipe Lopes Santos
Thank you ! This was a good package, exactly what I was looking at.

I had a minor problem:

1. Lines with quoted text, got an extra blank field in between. I commented out some of the code:

### Quot
if ($sym == $this->quot && $nextSym != $this->quot) {
$quotOpened = !$quotOpened;
/* if (!$quotOpened) { // Closing of quot, but is next a delimiter ? if then, we should have the delimiter do the rest.
$row[] = $word;
$word = "";
} */
continue;
}

2. empty fields with just two quotes: like "";"";""... returned an column with just an "

### Escaped quot-Empty field....
if ($sym == $this->quot && $nextSym == $this->quot) {
if ($word) $word .= $sym;
$i++;
continue;
}

3. Finally, to skip blank lines, i changed the section of delimiter: inserted an if ($row) in front of the assignment:

if ($row) $list[] = $row;

Now it should work nicely with quoted windows files.

regards,
Ole K E H

 
For more information send a message to info at phpclasses dot org.