Location: PHPKode > scripts > CsvParser > csvparser/Price.php
<?php

// csv2price generator
// (c) 2002 Berkus

include("CsvParse.php");

function gen_price_list($file)
{
   $csv = new CsvParser($file, false, ';');

?> <table cellpadding="1" cellspacing="1" border="0" width="80%"> <?
   for ($k = 0; $k < $csv->numRecords; $k++)
   {
      $rec = $csv->getRecord($k);

      if ($rec[0] == '1') { // header
?>    <tr>
         <td colspan="2" bgcolor="#000000"><div class="priceHead"><font color="#E0E0E0"><b><?=$rec[2]?></b></font></div></td>
      </tr> <?
      }
      else if ($rec[1] == '1') { // item
?>    <tr bgcolor="#E0E0E0">
         <td align="left"><div class="priceItem1"><?=$rec[2]?></div></td><td align="right"><div class="priceItem2"><nobr><?=$rec[3]?></nobr></div></td>
      </tr> <?
      }
   }
?> </table> <?
}

?>
Return current item: CsvParser