dbase functionality to parse .dbf files, not working.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nickelnick
Forum Newbie
Posts: 6
Joined: Thu Jan 17, 2008 2:26 pm

dbase functionality to parse .dbf files, not working.

Post by nickelnick »

test.php reads:

Code: Select all

<?php
   $af = 'EMP.DBF';
   $db = dbase_open($af, 0);
   if ($db) {
      $record_numbers = dbase_numrecords($db);
      echo "G rec cnt => $record_numbers<br>";
      for ($i = 1; $i <= $record_numbers; $i++) {
          $row = dbase_get_record_with_names($db, $i);
             echo $row['CHITNAME'];
      }
   }
   dbase_close($db);
?>
Is something different about this dbf that i cant parse it correctly? Am I using the wrong key in the row array? If you can help me, it would be awesome. Thanks in advance.
Attachments
EMP.ZIP
this is the db that we want to parse, rename zip to dbf due to security in bulliton.
(13.35 KiB) Downloaded 2 times
nickelnick
Forum Newbie
Posts: 6
Joined: Thu Jan 17, 2008 2:26 pm

Re: dbase functionality to parse .dbf files, not working.

Post by nickelnick »

bump
Post Reply