Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

udm cat path function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php udm cat path () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.0.6, PHP 5)

udm_cat_path -- Get the path to the current category

Syntax

array udm_cat_path ( resource agent, string category )

Returns an array describing the path in the categories tree from the tree root to the current one, specified by category. agent is the agent identifier returned by a previous call to >udm_alloc_agent().

The returned array consists of pairs. Elements with even index numbers contain the category paths, odd elements contain the corresponding category names.

For example, the call $array=udm_cat_path($agent, '02031D'); may return the following array:

$array[0] will contain ''
 $array[1] will contain 'Root'
 $array[2] will contain '02'
 $array[3] will contain 'Sport'
 $array[4] will contain '0203'
 $array[5] will contain 'Auto'
 $array[4] will contain '02031D'
 $array[5] will contain 'Ferrari'

Example 1. Specifying path to the current category in the following format: '> Root > Sport > Auto > Ferrari'

<?php
  $cat_path_arr
= udm_cat_path($udm_agent, $cat);
  
$cat_path = '';
  for (
$i=0; $i<count($cat_path_arr); $i+=2) {
    
$path = $cat_path_arr[$i];
    
$name = $cat_path_arr[$i+1];
    
$cat_path .= " > <a href=\"$_SERVER[PHP_SELF]?cat=$path\">$name</a> ";
  }
?>

See also udm_cat_list().

Php udm cat path Function syntax tag

udm cat path php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php udm cat path syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online