[ Šahbaz @ 23.05.2009. 11:07 ] @
Pozdrav, Pratio sam neki tutorijal ali sam zakucao tj. ni u samom tutorijalu nije napisano ono sto meni treba a to je stampanje liste elementa u fazonu: Code: <ul> <li>nesto</li><ul> <li>nesto 2</li> <li>nesto 2</li><ul> <li>nesto 3</li> <li>nesto 3</li> <li>nesto 3</li> </ul> </ul> <li>nesto</li> <li>nesto</li> </ul> .. Kod je sledeci i str_repeat radi sjajno ali meni treba lista: Code: <?php // $parent is the parent of the children we want to see // $level is increased when we go deeper into the tree, // used to display a nice indented tree function display_children($parent, $level) { // retrieve all children of $parent $result = mysql_query('SELECT title FROM tree '. 'WHERE parent="'.$parent.'";'); // display each child while ($row = mysql_fetch_array($result)) { // indent and display the title of this child echo str_repeat(' ',$level).$row['title']."\n"; // call this function again to display this // child's children display_children($row['title'], $level+1); } } ?> Ja sam se bas sabio ali mi ne ide... zato bi bilo sjajno ako neko moze da mi pomogne. Evo i slike koja ce mozda pojasniti sta mi to tacno treba: ![]() Ps. Ako trebaju jos kakvi detalji, tu sam... |