[PHP] Re: How to show specific records of a Dbase file

2001-08-26 Thread Er Galvão Abbott
I've solved it! You have to put the field name of the DBF, not the array position. I don't know exactly why, but it worked for me. So the code is: for ($x = 1; $x < $quant; $x++) { $drec = dbase_get_record_with_names($dbf,$x); echo "$drec[NAME]"; } Thanks a lot

[PHP] Re: How to show specific records of a Dbase file

2001-08-26 Thread Er Galvão Abbott
When I try with for ($x = 1; $x < $quant; $x++) { $drec = dbase_get_record_with_names($dbf,$x); echo "$drec[0].",".$drec[1]"; <- and so on } It only shows the dots. It doesn't show any of the fields. I know that dbf is a very prehistorical solution, but the clie

[PHP] Re: How to show specific records of a Dbase file

2001-08-26 Thread Hugh Bothwell
"Er GalvãO Abbott" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > foreach ($drec as $nome) > { > echo "$nome"; > } > But I'm trying (unsucessfully) to show only one or two fields of each > records.. Instead of foreach(), try something like echo $drec[0]