php-doc-en/reference/dbase/functions/dbase-numfields.xml

61 lines
1.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/dbase.xml, last change in rev 1.2 -->
<refentry id="function.dbase-numfields">
<refnamediv>
<refname>dbase_numfields</refname>
<refpurpose>
Find out how many fields are in a dBase database
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>dbase_numfields</methodname>
<methodparam><type>int</type><parameter>dbase_identifier</parameter></methodparam>
</methodsynopsis>
<para>
Returns the number of fields (columns) in the specified
database. Field numbers are between 0 and dbase_numfields($db)-1,
while record numbers are between 1 and dbase_numrecords($db).
<example>
<title>Using <function>dbase_numfields</function></title>
<programlisting role="php">
<![CDATA[
<?php
$rec = dbase_get_record($db, $recno);
$nf = dbase_numfields($db);
for ($i=0; $i < $nf; $i++) {
echo $rec[$i]."<br />\n";
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->