Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 2759

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>udm_cat_path</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="mnoGoSearch Functions"
HREF="ref.mnogo.html"><LINK
REL="PREVIOUS"
TITLE="udm_cat_list"
HREF="function.udm-cat-list.html"><LINK
REL="NEXT"
TITLE="udm_check_charset"
HREF="function.udm-check-charset.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.udm-cat-list.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.udm-check-charset.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.udm-cat-path"
></A
>udm_cat_path</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN46059"
></A
><P
>    (PHP 4 &#62;= 4.0.6)</P
>udm_cat_path&nbsp;--&nbsp;Get the path to the current category.</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN46062"
></A
><H2
>Description</H2
>array <B
CLASS="methodname"
>udm_cat_path</B
> ( int agent, string category)<BR
></BR
><P
>&#13;    <B
CLASS="function"
>udm_cat_path()</B
> returns array describing path in the 
    categories tree from the tree root to the current category.
   </P
><P
>&#13;    <TT
CLASS="parameter"
><I
>agent</I
></TT
> - agent link identifier.
   </P
><P
>&#13;    <TT
CLASS="parameter"
><I
>category</I
></TT
> - current category - the one to get path to.
   </P
><P
>&#13;    Returns array with the following format:
   </P
><P
>&#13;    The array consists of pairs. Elements with even index numbers contain category 
    paths, odd elements contain corresponding category names.
   </P
><P
>&#13;    For example, the call <TT
CLASS="literal"
>$array=udm_cat_path($agent, '02031D');</TT
> 
    may return the following array:
   </P
><P
CLASS="literallayout"
><br>
<br>
&nbsp;$array[0]&nbsp;will&nbsp;contain&nbsp;''<br>
&nbsp;$array[1]&nbsp;will&nbsp;contain&nbsp;'Root'<br>
&nbsp;$array[2]&nbsp;will&nbsp;contain&nbsp;'02'<br>
&nbsp;$array[3]&nbsp;will&nbsp;contain&nbsp;'Sport'<br>
&nbsp;$array[4]&nbsp;will&nbsp;contain&nbsp;'0203'<br>
&nbsp;$array[5]&nbsp;will&nbsp;contain&nbsp;'Auto'<br>
&nbsp;$array[4]&nbsp;will&nbsp;contain&nbsp;'02031D'<br>
&nbsp;$array[5]&nbsp;will&nbsp;contain&nbsp;'Ferrari'<br>
<br>
&nbsp;&nbsp;&nbsp;</P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN46084"
></A
><P
><B
>Ejemplo 1. 
     Specifying path to the current category in the following format: 
     '&#62; Root &#62; Sport &#62; Auto &#62; Ferrari'
    </B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php
  $cat_path_arr = udm_cat_path($udm_agent,$cat);
  $cat_path = '';
  for ($i=0; $i&#60;count($cat_path_arr); $i+=2) {
    $path = $cat_path_arr[$i];
    $name = $cat_path_arr[$i+1];
    $cat_path .= " &#62; &#60;a href=\"$PHP_SELF?cat=$path\"&#62;$name&#60;/a&#62; ";
  }
?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.udm-cat-list.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.udm-check-charset.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>udm_cat_list</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.mnogo.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>udm_check_charset</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>