mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-28 14:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
91 lines
2.3 KiB
XML
91 lines
2.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- splitted from ./en/functions/mnogosearch.xml, last change in rev 1.18 -->
|
|
<refentry id="function.udm-cat-list">
|
|
<refnamediv>
|
|
<refname>udm_cat_list</refname>
|
|
<refpurpose>Get all the categories on the same level with the current one.</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>udm_cat_list</methodname>
|
|
<methodparam><type>int</type><parameter>agent</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>category</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
<function>udm_cat_list</function> returns array listing all categories of the same
|
|
level as current category in the categories tree.
|
|
</para>
|
|
|
|
<para>
|
|
The function can be useful for developing categories tree browser.
|
|
</para>
|
|
<para>
|
|
Returns array with the following format:
|
|
</para>
|
|
|
|
<para>
|
|
The array consists of pairs. Elements with even index numbers contain category
|
|
paths, odd elements contain corresponding category names.
|
|
</para>
|
|
|
|
<literallayout>
|
|
<![CDATA[
|
|
$array[0] will contain '020300'
|
|
$array[1] will contain 'Audi'
|
|
$array[2] will contain '020301'
|
|
$array[3] will contain 'BMW'
|
|
$array[4] will contain '020302'
|
|
$array[5] will contain 'Opel'
|
|
...
|
|
etc.
|
|
]]>
|
|
</literallayout>
|
|
<literallayout>
|
|
Following is an example of displaying links of the current level in format:
|
|
Audi
|
|
BMW
|
|
Opel
|
|
...
|
|
</literallayout>
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$cat_list_arr = udm_cat_list($udm_agent,$cat);
|
|
$cat_list = '';
|
|
for ($i=0; $i<count($cat_list_arr); $i+=2) {
|
|
$path = $cat_list_arr[$i];
|
|
$name = $cat_list_arr[$i+1];
|
|
$cat_list .= "<a href=\"$PHP_SELF?cat=$path\">$name</a><br>";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
|
|
</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
|
|
-->
|