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]<br>";
        }

Thanks a lot for your help!

Best regards

On Sun, 26 Aug 2001 16:05:36 -0400, [EMAIL PROTECTED] (Hugh
Bothwell) wrote:

>
>"Er GalvãO Abbott" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>> foreach ($drec as $nome)
>> {
>> echo "$nome<br>";
>> }
>
>> But I'm trying (unsucessfully) to show only one or two fields of each
>> records..
>
>Instead of foreach(), try something like
>    echo $drec[0].", ".$drec[1];
>(or whichever records it is you want).
>
>Note: in the PHP documentation, they specifically
>suggest abandoning DBase for any of the free
>SQL databases (MySQL, PostgreSQL, etc).
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to