You are here: simple algorithm tree/array pbm « PHP Programming Language « IT news, forums, messages
simple algorithm tree/array pbm

Posted by romain.jouin on 09/21/05 22:11

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/coursHtml/Exercices/exercice8/arbre/CalaRossaSurvey.xml
http://www.map.archi.fr/dpea/coursHtml/Exercices/exercice8/arbre/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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация