You are here: Re: Parsing CSV-file and adding CSS to style « PHP Programming Language « IT news, forums, messages
Re: Parsing CSV-file and adding CSS to style

Posted by Geoff Berrow on 06/24/06 12:40

Message-ID: <449d2e3f$1@news.broadpark.no> from Ørjan Langbakk contained
the following:

>I need to have each <td> present in the code, so as to be able
>to assign a class to the last one, but how? I can tell as much as that I
>know the number of <td>'s in each CSV-file - they are a constant).
>
>Any help would be appreciated.

Untested.
....
$this->html .= "<tr>";
$count=0;
foreach($row as $field){
if($count<3){
$this->html .= "<td>$field</td>";
}
else{
$this->html .= "<td
style='text-align:center'>$field</td>";
}
$count ++;
}
$this->html .= "</tr>\n";

....
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация