473,385 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

simple algorithm tree/array pbm

hi !

I'm trying to simulate a "windows explorer-like" tree on my page. What
I would like is when the user click one of the level, the data make
themselves visible ( It's ok to recharge the page).

I tried to use the xml/xslt following example :

http://www.map.archi.fr/dpea/coursHt...ossaSurvey.xml
http://www.map.archi.fr/dpea/coursHt...rbre/arbre.php

But as I don't know xsl I can't figure out how to add a hlink or a
checkbox on the resulting tree in order to have further actions...

So I decided to do it myself, It seems like I´m reaching my limits
when I've to manage this kind of structure :

Array
(
[3100000000] => Array
(
[0] => Array
(
[0] => 3110000000
[1] => 3210000000
[3220000000] => Array
(
[0] => Array
(
[0] => 3220000001
[1] => 3220000002
[2] => 3220000003
[3] => 3220000004
[4] => 3220000005
[5] => 3220000006
)

)

[2] => 3230000000
)

)

[3200000000] => Array
(
[0] => Array
(
[0] => 3400000000
[1] => 3221000000
)

)

)
First I display

3100000000
3200000000

And I would like when someone click on 3100000000 to see :
3100000000
3110000000 |
3210000000 |
3220000000 |=> new visible lines
3230000000 |
3200000000

And following, when clinking on

3100000000
3110000000
3210000000
3220000000
3220000001 |
3220000002 |
3220000003 |=> new visible lines
3220000004 |
3220000005 |
3220000006 |
3230000000
3200000000
Yes, it's a simple algorithm problem, but I can't figure out how to do
it...
Any idea of code or library making it is welcome...

Thanks.
JR.

Sep 21 '05 #1
0 1525

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeffrey Silverman | last post by:
Hi, all. I have a linked list. I need an algorithm to create a tree structure from that list. Basically, I want to turn this: $list = array( array( 'id' => 'A', 'parent_id' => null, 'value'...
0
by: Dinesh | last post by:
Hi, I have two tables 'master' and 'child', the master is the master table for all nodes in all trees. To get children of any node, we need to go to the 'child' table to get the nodeid of the...
10
by: Aris | last post by:
Hello! This is my problem. I'm trying to make an inorder traversal algorithm for a binary tree, not a recursive one, but using a stack. Till now I got this: void traverse(tree * p) { l:...
27
by: karan.shashi | last post by:
Hey all, I was asked this question in an interview recently: Suppose you have the method signature bool MyPairSum(int array, int sum) the array has all unique values (no repeats), your...
18
by: Bob Cummings | last post by:
Not sure if this is the correct place or not. Anyhow in school we were taught that when trying to calculate the efficiency of an algorithm to focus on something called FLOPs or Floating Point...
9
by: Josh Zenker | last post by:
I've been working on an implementation of Dijkstra's algorithm on and off for the past few days. I thought I was close to being finished, but clearly I've done something wrong. I'm not a very...
6
by: pj | last post by:
Hi, I 'm currently writing a program that performs transliteration (i.e., converts greek text written using the english alphabet to "pure" greek text using the greek alphabet) as part of my...
4
by: uidzer0 | last post by:
Hey everyone, I'm having a little trouble writing an algorithm to create a hierarchal structure from a database which looks like this: Code: parent_id | child_id |...
2
by: slizorn | last post by:
hi guys, i need to make a tree traversal algorithm that would help me search the tree.. basically i need to read in a text file... shown below H H,E,L E,B,F B,A,C A,null,null c,null,D
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.