Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

udm_cat_list(3) [php man page]

UDM_CAT_LIST(3) 							 1							   UDM_CAT_LIST(3)

udm_cat_list - Get all the categories on the same level with the current one

SYNOPSIS
array udm_cat_list (resource $agent, string $category) DESCRIPTION
Gets all the categories on the same level with the current one. The function can be useful for developing categories tree browser. PARAMETERS
o $agent - A link to Agent, received after call to udm_alloc_agent(3). o $category - RETURN VALUES
Returns an array listing all categories of the same level as the current $category in the categories tree. The returned array consists of pairs. Elements with even index numbers contain the category paths, odd elements contain the corresponding category names. $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. EXAMPLES
Following is an example of displaying links of the current level in format: Audi BMW Opel ... Example #1 udm_cat_list(3)example <?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="$_SERVER[PHP_SELF]?cat=$path">$name</a><br />"; } ?> SEE ALSO
udm_cat_path(3). PHP Documentation Group UDM_CAT_LIST(3)

Check Out this Related Man Page

UDM_CAT_PATH(3) 							 1							   UDM_CAT_PATH(3)

udm_cat_path - Get the path to the current category

SYNOPSIS
array udm_cat_path (resource $agent, string $category) DESCRIPTION
Returns an array describing the path in the categories tree from the tree root to the current one, specified by $category. PARAMETERS
o $agent - A link to Agent, received after call to udm_alloc_agent(3). o $category - RETURN VALUES
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' EXAMPLES
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(3). PHP Documentation Group UDM_CAT_PATH(3)
Man Page

13 More Discussions You Might Find Interesting

1. What is on Your Mind?

Lexus GX470 vs. BMW X5 3.0i

Hi, I hope I could make a thread that talks about SUVs. If not, you could delete this thread. Anyway, I'm trying to pick a SUV for my dad and sister. My dad likes Lexus GX470 and my sister likes BMW X5 3.0i. They asked me which one is better, good or popular the GX470 or the X5 3.0i. They don't... (4 Replies)
Discussion started by: royal
4 Replies

2. Shell Programming and Scripting

Array help

Hi all, I have the scenario where i have different categories of servers of 4 pairs, like pairA=4 serves,pairB=4 servers like that. I want to store them in an array with their hostnames, depends on that hostname iam running this script if that falls in any array the script should do something. ... (4 Replies)
Discussion started by: Jartan
4 Replies

3. UNIX and Linux Applications

Does anyone know BMW tool - bwm_tools-0.3.0

Does anyone know BMW - bwm_tools-0.3.0 from "http://bwm-tools.pr.linuxrulz.org". I have error on make installing on opensuse 11.0, see logs. # make make all-recursive make: Entering directory `/opt/bwm_tools-0.3.0' Making all in lib make: Entering directory `/opt/bwm_tools-0.3.0/lib'... (0 Replies)
Discussion started by: real-chess
0 Replies

4. Shell Programming and Scripting

Help me with AWK!

Hi guys, This is my text file contains data like, Merk Type Cost M.Year Aston Martin 85000 2007 Mercedes Benz 60000 2006 BMW X5 65000 2008 AUDI A4 40000 2007... (1 Reply)
Discussion started by: thusi26
1 Replies

5. Post Here to Contact Site Administrators and Moderators

How to change the category?

Hi, I submitted my blog on UNIX in the links section. On submitting, i chose the category as Unix/Linux standards, which i now feel is incorrect. I would like to change the category of my link, but i don't find any option to change the category. Please help me in doing the needful. Thanks... (7 Replies)
Discussion started by: guruprasadpr
7 Replies

6. UNIX for Dummies Questions & Answers

Grep Unique

Hello, I have a file with a list of car makes and specific information for each make. An example is: @Audi:Warranty @Audi:Pricing @Audi:Colors @Acura:Warranty @Acura:Pricing @Acura:Colors and so on through a bunch of makes. I need to make a list in a selection box of just one name of... (4 Replies)
Discussion started by: macbb1117
4 Replies

7. Shell Programming and Scripting

Uniq Command?

Hello, I have a file with a list of car makes and specific information for each make. An example is: @Audi:Warranty @Audi:Pricing @Audi:Colors @Acura:Warranty @Acura:Pricing @Acura:Colors and so on through a bunch of makes. I need to make a list in a selection box of just one name of... (12 Replies)
Discussion started by: macbb1117
12 Replies

8. Shell Programming and Scripting

Parsing out the first (top) data lines of each category

Hi All, I need some help in parsing out the first (top) data lines of each category (categories are based on the first column a, b, c, d, e.( see example file below) from a big file a dfg 3 6 8 9 a fgh 5 7 0 9 a gkl 5 2 4 7 a glo 7 0 1 5 b ghj 9 0 4 2 b mkl 7 8 0 5 b jkl 9 0 4 5 c jkl 2... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

9. Shell Programming and Scripting

Help with appending to a csv file

I am working to import a file and have almost all the information accounted for except this last item. First of all the file name is the category and this is what I need to append to the file. The catch I believe is the fact the file name has spaces in it. Filename CPU Products.csv File... (3 Replies)
Discussion started by: nkr1ptd
3 Replies

10. Shell Programming and Scripting

How to analyse results of grep

Hi all, I'm working with a peice of software that runs on Linux that allows planning trips in cars through maps. This software has different variations depending on the type of car, e.g. BMW, Audi, Hyundai, etc... Each variation has a dependency on common external components that are not... (1 Reply)
Discussion started by: emoshaya
1 Replies

11. Shell Programming and Scripting

Comparing two files with numbers and taking difference in third file

Hi All, I have two files in the following format, with numbers being defined under columns(described by a set of headers) and rows(again defined by a set of identifiers) 2013 2013 Make200 Make201 Merc BMW Jpur Del ... (9 Replies)
Discussion started by: dev.devil.1983
9 Replies

12. Shell Programming and Scripting

Inserting column data based on category assignment

please help with the following. I have 4 col data .. instrument , category, variable and value. the instruments belong to particular categories and they all measure some variables (var1 and var2 in this example), the last column is the value an instrument outputs for a variable. I have used... (0 Replies)
Discussion started by: ritakadm
0 Replies

13. UNIX for Beginners Questions & Answers

BMW GT1 DIS - SCO 5.0 and Oracle 7 Root HDD Clone - IBM T30

Greeting All Diag tool HDD clone SCO 5 + Oracle 7 DB ( IBM T30 ) I am new to this forum and my knowledge on computers OS is average . I have just acquired a factory diag tool for BMW/RR/MINI from a retired mechanic. Its runs on a IBM T30 laptop with a Unix/Oracle DB system. Sco 5... (8 Replies)
Discussion started by: bmw635
8 Replies