Re: Re: CSV.php question
| From: | Tobias Lauszat | Date: | Wed, 05 Jun 2002 13:01:18 +0000 |
| Subject: | Re: Re: CSV.php question | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1585@lists.php.net to get a copy of this message | ||
Am Mittwoch, 5. Juni 2002 14:13 schrieb F.Thiel:
> >What about that (not tested code):
> >
> ><?php
> >require 'File/CSV.php';
> >$file = 'your_csv_file';
> >$conf = File_CSV::discoverFormat($file);
> >$i = 0;
> >while($row = File_CSV::read($file, $conf)) {
> > if ($i++ == 1) {
> > row2HTML($row);
> > continue;
> > }
> > if ($row[0] == 234) {
> > row2HTML($row);
> > break;
> > }
> >}
> >
> >function row2HTML($row) {
> > print '<tr><td>'.$row[0].'<...;
> >}
> >?>
>
> Hello Tomas,
> now i do get this ErrorMessage:
>
> Fatal error: Call to undefined function: getstaticproperty() in
> e:\htdocs\projekte\File.php on line 120
>
> This is my code:
>
> <?php
> require 'CSV.php';
> $file = 'file.csv';
> $conf = File_CSV::discoverFormat($file);
> $i = 0;
>
> while($row = File_CSV::read($file, $conf)) {
> if ($i++ == 1) {
> row2HTML($row);
> continue;
> }
> if ($row[0] == $buy) {
> row2HTML($row);
> break;
> }
> }
>
> function row2HTML($row) {
> print '<tr><td>'.$row[0].'</td></tr>';
> }
>
> ?>
>
>
> And this is the Link:
>
> http://127.0.0.1/projekte/csvfile.php?buy=234
>
>
> THX
>
> Frank